in reply to Best way to replace 'die' with 'warn'
Perhaps someone more knowledgeable could clarify, but perlmod seems to indicate that you can set the %SIG hash as a package variable, so you could do something like this:
use Weather::Com; $Weather::Com::SIG{__DIE__} = sub { warn(@_) };
I think that would cover every call to die() from within the Weather::Com package. Inspection of @_ within your new handler could let it die if something was really a big problem.
@_=qw; Just another Perl hacker,; ;$_=q=print "@_"= and eval;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Best way to replace 'die' with 'warn'
by puterboy (Scribe) on Dec 06, 2009 at 10:36 UTC |
In Section
Seekers of Perl Wisdom