perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Peters <>
Subject Re: Making warnings trigger errors.
Date Tue, 23 Jan 2007 19:15:21 GMT

Tyler Bird wrote:
> Does anybody know if there is a module
> or some kind of directive in either perl or mod_perl
> to make warnings produce the same affects as errors.

Just change the signal handler.

$SIG{__WARN__} = $SIG{__DIE__};

Not sure why you'd want that though. But sometimes I need some help in tracking
down warnings, so I do something like this:

use Carp;
$SIG{__WARN__} = \&Carp::cluck;

Michael Peters
Plus Three, LP

View raw message