in reply to Disable writing of eval'd errors to CGI log

The problem probably is that eval is great for trapping errors and allowing you to deal with them nicely, but it doesn't do anything for trapping warnings.

For that you have to set up a $SIG{__WARN__} handler.

See warn for a brief discussion on how to trap warnings. Also, look at perlvar for info on setting %SIG entries, and the Carp module's POD for a more detailed discussion on error and warning handling.

What you're thinking are errors might, in fact, just be warnings.


Dave


"If I had my life to live over again, I'd be a plumber." -- Albert Einstein
  • Comment on Re: Disable writing of eval'd errors to CGI log

Replies are listed 'Best First'.
Re: Re: Disable writing of eval'd errors to CGI log
by Itatsumaki (Friar) on Nov 28, 2003 at 18:36 UTC

    Thanks, this was necessary for most of the BioPerl warnings.