More on $SIG handlers

djberg96 on 2001-12-31T15:38:59

After fumbling around with $SIG{__DIE__} in conjunction with 'eval', I happened to come across a thread on clpm that led me to a Damian Conway article that discussed this very topic.

His solution was to create a local copy of CORE::GLOBAL::die and use that instead. Seems like a good idea, one that I wish had been discussed in the multitude of perl books that I've read.

Time to test it out now...

Addendum Ok - tested it out. Works like a charm. In fact, it probably ought to be the standard idiom and not $SIG{__DIE__}.