Adding this to httpd.conf:
PerlModule Does::not::ExiST
aborts the startup and prints the error message.
The following section should be an equivalent one and behave the same:
<Perl> use Apache::ServerUtil; my $s = Apache->server->add_config(['PerlModule Does::not::ExiST']); </Perl>
but it doesn't fail. By tracing through I can see that we simply return the error message through add_config and expect the user to test for the error message? Most people won't think of doing that and will scratch their heads in mystery why things seem to be wrong, while the server has started. Besides it makes the above two snippets which do the same thing behave differently.
I suggest to change add_config methods to return void, and croak on error. Following is a partial patch w/o adjusting the return values to void.
Of course we still have the perlsections bug where a failing perlsection doesn't prevent from the server to happily continue its starting, so that croak below won't kill the server. it'd be very handy to get it fixed, hint, hint ;)
Index: src/modules/perl/modperl_config.c =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.c,v retrieving revision 1.74 diff -u -r1.74 modperl_config.c --- src/modules/perl/modperl_config.c 10 Jan 2004 02:52:20 -0000 1.74 +++ src/modules/perl/modperl_config.c 22 Jan 2004 07:28:19 -0000 @@ -452,6 +452,10 @@ apr_pool_destroy(parms.temp_pool); }
+ if (errmsg) { + Perl_croak(aTHX_ "%s", errmsg); + } + return errmsg; }
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]