perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
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 <stas@stason.org> 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:
http://search.cpan.org/src/FWILES/Apache-DB-0.10/lib/Apache/DProf.pm

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';
http://search.cpan.org/src/FWILES/Apache-DB-0.10/DB.pm

-- 
_____________________________________________________________
Stas Bekman mailto:stas@stason.org  http://stason.org/
MailChannels: Assured Messaging(TM) http://mailchannels.com/
The "Practical mod_perl" book       http://modperlbook.org/
http://perl.apache.org/ http://perl.org/ http://logilune.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message