Perrin Harkins wrote:

> On Tue, 18 Apr 2000, Steve Hay wrote:
>
> > The first one calls die() itself.
> [...]
>
> 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?

I did have PerlSendHeader On: turning it off causes a DOS Prompt to pop up
briefly, the die() message still goes to error.log and no output appears in
the browser at all!

>  > The second one has a syntax error.
> [...]
>
> CGI::Carp can't catch compile errors.

Oh.  The CGI::Carp manpage says (regarding the use of "set_message()" to
control the output message): "In order to correctly intercept compile-time
errors, you should call set_message() from within a BEGIN{} block. ", which
suggests it does catch compile errors?  I've tried both with "BEGIN
{set_message('...')}" and without a set_message() at all, but to no avail.


- Steve Hay


Reply via email to