Do NOT, however, use $SIG::{__DIE__} in anything you intend to distribute through CPAN.
More than once I have wasted an hour or two tracking a bug that was having its error messages swallowed by a CPAN module that blithely used an unlocalized $SIG::{__DIE__} handler for its own error processing and did not propagate unknown errors. Thereby stomping all over my application's own error handling (and any other module that might need to 'die').
It only takes one mis-use of $SIG::{__DIE__} anywhere in a body of code to mess it up for everyone. It is much too fragile for use in general release code.
|