in reply to How bad is $SIG{__DIE__} really?
A combination of $SIG{__DIE__} and $^S is what is recommended by Log::Log4Perl
All the usages I have seen invert the conditions that brian d foy was talking about in his article; the $SIG{__DIE__} handler is skipped in eval{}
i.e.:
$SIG{__DIE__} = sub { return if $^S; # ignore die in an eval block # Get the actual caller for the "die" and not the wrapper local $Log::Log4perl::caller_depth; $Log::Log4perl::caller_depth++; LOGDIE($_[0]); };
|
|---|