http://qs321.pair.com?node_id=690974


in reply to $SIG{__DIE__} not working as expected

Any ideas or suggestions?

Read again the related documentation of die and $SIG{__DIE__}. In the last case, the documentation of $SGI{__DIE__} can be found at perlvar or if you have a brand new perldoc (like Pod-Perldoc-3.14_07), you can retrieve the docs that will help you with:

$ perldoc -v '$SIG{expr}'

The relevant piece is

When a __DIE__ hook routine returns, the exception processing continues as it would have in the absence of the hook, unless the hook routine itself exits via a "goto", a loop exit, or a die().

In other words, your current DIE handler does not stop the program from dying which explains the messages you are seeing.