perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: svn commit: r371915 - in /perl/modperl/trunk/t: conf/ hooks/TestHooks/
Date Wed, 25 Jan 2006 01:27:29 GMT
Geoffrey Young wrote:
> Stas Bekman wrote:
>> wrote:
>>>Author: geoff
>>>Date: Tue Jan 24 05:55:39 2006
>>>New Revision: 371915
>>>add simple tests to make sure $ENV{MOD_PERL}
>>>and $ENV{MOD_PERL_API_VERSION} are set as soon
>>>as possible
>>>    perl/modperl/trunk/t/conf/
>>>    perl/modperl/trunk/t/hooks/TestHooks/
>>>Modified: perl/modperl/trunk/t/conf/
>>>--- perl/modperl/trunk/t/conf/ (original)
>>>+++ perl/modperl/trunk/t/conf/ Tue Jan 24 05:55:39 2006
>>>@@ -67,6 +67,13 @@
>>> $TestDirective::perl::base_server = Apache2::PerlSections->server;
>>> </Perl>
>>>+<Perl >
>>>+# make sure that these are set at the earliest possible time
>>>+die '$ENV{MOD_PERL} not set!' unless $ENV{MOD_PERL};
>>>+die '$ENV{MOD_PERL_API_VERSION} not set!'
>>>+    unless $ENV{MOD_PERL_API_VERSION} == 2;
>>The only issue here is that Apache ignores any failures in the mp land
>>at the server startup and it'll still start regardless.
> that isn't what I observed - I put a die in there and the other place and
> the server didn't start.  granted, the error message wasn't all that
> informative, but it did keep the server from starting... at least with the
> apache I tested :)

Ah, of course, it does respect failures during the config phase, but 
ignores them in post_config, open_logs and child_init. So your patch is 
just perfect, Geoff.

>>But as we know
>>this die shouldn't happen I guess it's OK. (and of course everybody
>>observes error_log during the test suite run :)
> actually, I couldn't get the open_logs handler to spit errors to the
> error_log, which I guess is kinda the risk you run when messing around with
> that phase...

Probably because it's not yet open, it's open only on restart. Most of our 
code here at mailchannels we skip the init on the server startup, and only 
run it on the restart, when error_log is available.

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

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

View raw message