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 mod_perl2.pm.
I didn't check everywhere, but at least these docs need to be corrected:
http://perl.apache.org/docs/2.0/user/porting/compat.html#C__ENV_GATEWAY_INTERFACE__
http://perl.apache.org/docs/2.0/user/porting/porting.html#Making_Code_Conditional_on_Running_mod_perl_Version
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.
Thanks.
--
_____________________________________________________________
Stas Bekman mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]