According to the man page, your code would propagate the die -- but only if executing an eval. Why not always do it?
Not quite. I propagated the die without further action if executing an eval.
I left up to you what to do when outside of any eval, likely something followed by die or exit.
I don't really see the difference between using $SIG{__DIE__} and overriding CORE::GLOBAL::die, so you might as well use the latter.
BEGIN { *CORE::GLOBAL::die = sub { CORE::die(@_) if $^S; ... }; } BEGIN { *CORE::GLOBAL::warn = sub { ... }; }
We still need to check $^S, so I don't understand the warning perlvar gives.
Anyway, in light of the warning in perlvar, what "difficult to track down" errors am I apt to run into, here?
I don't know.
In reply to Re^3: logging, to include unhandled exceptions
by ikegami
in thread logging, to include unhandled exceptions
by klassa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |