Exception::Handler

miyagawa on 2002-01-11T14:47:54

Seeing through Dave Rolsky's Exception::Class and Sig::PackageScoped has let me make the module, called Exception::Handler.

In fact I rarely use $SIG{__DIE__} for exception handling, but the concept of the module would be a bit interesting.

Tarball can be fetched from: here.


My solution

djberg96 on 2002-01-13T00:19:10

I recently ran into problems with $SIG{__DIE__} myself (doesn't mix with "eval"), and saw at least one of Dave Rolsky's modules.

My solution, based entirely on a small blurb by Damian Conway, was to redefine the "die" sub like so:

*CORE::GLOBAL::die = \&handle_die;

I posted to clpm about any potential drawback to doing this, but no one responded. Any thoughts?