perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject issues with figuring out which mp version is running
Date Sat, 21 Jan 2006 00:13:10 GMT
The docs advertise invalid information about figuring out whether we are 
running under mp2 or mp1:

  use mod_perl;
  use constant MP2 => ($mod_perl::VERSION >= 1.99);

that will always fail, since mp2 now lives in

I didn't check everywhere, but at least these docs need to be corrected:

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.


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

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

View raw message