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


in reply to Re: Automatic stack traces for warns and dies
in thread Automatic stack traces for warns and dies

That is a simpler implementation but it doesn't preserve the original values in %SIG and will also mess up anything that uses real exceptions (as in Error or Exception::Class) which might do something like
eval { something_that_might_die()}; if ($@->isa('FileException')) { handle_file_exception } else { die $@; }