in reply to Re: XML::Simple conflicts with $SIG{__DIE__}
in thread XML::Simple conflicts with $SIG{__DIE__}
Implementation of the Exception::Unknown class is left as an exercise. Also note the use of local - so that if we're running under something like mod_perl we don't screw up everyone elses handler that might not want this effect.local $SIG{__DIE__} = sub { my $err = shift; if (ref($err)) { die $err; } else { throw Exception::Unknown (error => $err); } };
|
|---|