in reply to apache2 startup consistency checks

Try printing to STDERR and then bailing out with CORE::exit(1).

Replies are listed 'Best First'.
Re^2: apache2 startup consistency checks
by ysth (Canon) on May 18, 2006 at 19:14 UTC
    Thanks for the suggestion.

    I'm going to print to STDERR, then have the module return a false value, assuming that mod_perl will die as gracefully as it requires if that happens. Doing that prints my error message, then a syntax error in httpd.conf message and a Foo.pm dit not return a true value message, which is fine with me.

Re^2: apache2 startup consistency checks
by ysth (Canon) on May 18, 2006 at 19:02 UTC
    That does work, but...

    I see in ModPerl::Util:

    or use C<CORE::exit()>: eval { CORE::exit; } print "Still running"; and nothing will be printed. The problem with the latter is the current process (or a Perl Interpreter) will be killed; something that you really want to avoid under mod_perl.
    (where it's talking about why eval { exit } doesn't actually exit).

    In this case, I do want to actually kill everything, but am still concerned by that "something that you really want to avoid". I was hoping there'd be an actual mod_perl-supplied mechanism to stop the show.

      What that's saying is that you don't want to exit while serving web requests. It's no problem to abort startup by calling exit.