perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: issues with figuring out which mp version is running
Date Sun, 22 Jan 2006 04:32:35 GMT
Frank Wiles wrote:
> On Fri, 20 Jan 2006 16:13:10 -0800
> Stas Bekman <> wrote:
>>I'm trying to make Apache::DProf to work under mp2 and I thought the 
>>following will work:
>>	die "mod_perl is required to run this module"
>>             unless $ENV{MOD_PERL};
>>         use constant MP2 => $ENV{MOD_PERL} >= 2;
>>but no such luck, since $ENV{MOD_PERL} is set at the end of
>>post_config, and Apache::DProf loads during the config phase.
>>I think setting of $ENV{MOD_PERL} needs to be moved to happen as soon
>>as perl starts and before we try to run any code or load any modules.
>   Can you give me more info about how APache::DProf isn't working for
>   you?  I just used it yesterday in fact with MP 2.0.1 without any
>   problems. 

Sure in:

it goes:

   use constant MP2 => eval { require mod_perl; $mod_perl::VERSION > 1.99 };

so MP2 can never be true, since it should be mod_perl2 not mod_perl. Since 
I don't have mp1 installed (which I guess happens to work instead) the 
module doesn't work.

FWIW, Apache::DB has 'require mod_perl2';

Stas Bekman
MailChannels: Assured Messaging(TM)
The "Practical mod_perl" book

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message