On Sat, Oct 15, 2011 at 19:35, Torsten Förtsch <torsten.foert...@gmx.net> wrote:
> On Saturday, 15 October 2011 18:00:26 Ævar Arnfjörð Bjarmason wrote:
>> Maybe this is something elementary that I've just missed, but it seems
>> to me that when transitioning from mod_perl 1 to 2 there's no way to
>> get a non-zero exit code from Apache if your application has
>> compilation errors.
>>
>> I have an application that I'm loading like this:
>>
>>     PerlPostConfigRequire     /usr/local/myapp/startup.pm
>
> How about loading it earlier?
>
> $ cat xx
> <Perl>
> use POSIX();
> POSIX::exit(15);
> </Perl>
> $ httpd -c 'Include "'$PWD/xx'"'; echo $?
> 15
> $ cat xx
> <Perl>
> die
> </Perl>
> $ httpd -c 'Include "'$PWD/xx'"'; echo $?
> Syntax error on line 2 of /.../xx:
> \t(in cleanup) Died at /.../xx line 2.\n
> 1
> $

I can load code earlier, but unless I'm misunderstanding something the
PerlInterpreter running that code *won't* be the one that'll be forked
and serving requests.

Reply via email to