Geoffrey Young wrote:
Stas Bekman wrote:
Geoffrey Young wrote:
[...]
but regardless, stas has a point - we need a definitive way to tell
whether
you are running under mp1 or mp2, then update the docs.
my suggestion is to check for $ENV{MOD_PERL_API_VERSION}, which only
exists
in the official 2.0 API (mp 1.999_22 and later). if that isn't set at
the
earliest possible moment, before _any_ mod_perl hooks can be called,
then we
need to fix that.
That's the case. It needs to be fixed. And so do the docs.
hmm...
I started to work on this but couldn't get it to fail as you describe.
basically all I did was add code that looked for $ENV{MOD_PERL_API_VERSION}
during config (<Perl> sections) and the open_logs and post_config phases
(where you said you were having trouble) and I can see it every time.
yeah, I can see that it's actually set during post_config, but I'm hesitant
to shuffle things around if I can't actually reproduce the problem in the
first place.
You're right, Geoff. They do get populated at the server startup:
static void modperl_boot(pTHX_ void *data)
{
[...]
modperl_env_default_populate(aTHX);
(it just happens twice for some reason, I've missed that second population
happening in modperl_env_hash_keys, it probably happens due to un-tie of %ENV)
In which case checking $ENV{MOD_PERL_API_VERSION} should do the trick.
--
_____________________________________________________________
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]