You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Tyler Bird <bi...@epromo.com> on 2007/01/23 20:13:40 UTC
Making warnings trigger errors.
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.
Thanks
Tyler
Re: Making warnings trigger errors.
Posted by Phil Whelan <ph...@gmail.com>.
> Or to do it lexically:
>
> use warnings FATAL => 'all';
I used this before to find out where a warning was coming from that I
just could track down. Easy to find if it dies.
Re: Making warnings trigger errors.
Posted by Clinton Gormley <cl...@traveljury.com>.
> Just change the signal handler.
>
> $SIG{__WARN__} = $SIG{__DIE__};
Or to do it lexically:
use warnings FATAL => 'all';
Re: Making warnings trigger errors.
Posted by Michael Peters <mp...@plusthree.com>.
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
Developer
Plus Three, LP