On Tue, 18 Apr 2000, Steve Hay wrote:
> I'm having problems using "CGI::Carp qw(fatalsToBrowser);" in modperl
> scripts.
[...]
> The first one calls die() itself. Under Apache/CGI the die() message
> appears in the web browser (albeit preceded by a
> spurious Content-Type line), but under Apache/modperl the message goes
> to the error.log and a bizarre message appears in
> the web browser consisting of some output from the script, followed by a
> "200 OK" HTTP header, followed by a message
> suggesting that all was not OK after all (all the same as if CGI::Carp
> was not being used).

Sounds like a difference in the way CGI scripts and mod_perl buffer.  I
fyou really want CGI::Carp to work, you need to make sure you don't send
any output before it gets called.  Maybe you have PerlSendHeader on?

 > The second one has a syntax
error. Under Apache/CGI
a message about a > compilation error appears in the web browser (but not
> the detail of the syntax error itself, which disappears completely - not
> even going to error.log!); under Apache/modperl an
> "Internal Server Error" message appears in the web browser (again just
> like CGI::Carp was not being used) and (curiously)
> the detail of the syntax error does now at least appear in error.log!

CGI::Carp can't catch compile errors.

- Perrin

Reply via email to