summaryrefslogtreecommitdiff
path: root/dist/Carp
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-15 22:07:06 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-15 22:09:34 -0800
commit63a756fa5b8bee9f48b9967f05c64f548c8008cc (patch)
tree4413db9553f27b3a0237dbb9081ed8b947060f43 /dist/Carp
parent0ae110173629d28a032c3c74f9c8ff6dbf2a61eb (diff)
downloadperl-63a756fa5b8bee9f48b9967f05c64f548c8008cc.tar.gz
Carp.pm localise $SIG{__DIE__} before eval
Otherwise we end up calling other code’s $SIG{__DIE__}.
Diffstat (limited to 'dist/Carp')
-rw-r--r--dist/Carp/lib/Carp.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index cd9eb870d0..c08af19b0f 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -289,6 +289,7 @@ sub ret_backtrace {
$mess = "$err at $i{file} line $i{line}$tid_msg";
if( defined $. ) {
local $@ = '';
+ local $SIG{__DIE__};
eval {
die;
};