diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-18 06:55:33 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-18 06:55:33 +0000 |
commit | 0bcd2fea6bc6ecdf03a0c2410ba83be70e2072dc (patch) | |
tree | a1aec01b6c7f5fd8d468b102fa727fdd983628e3 /lib/Carp.pm | |
parent | aeaf5620e0d123aeb6a6ba30ef2e89c6f5fc26d0 (diff) | |
download | perl-0bcd2fea6bc6ecdf03a0c2410ba83be70e2072dc.tar.gz |
avoid $@-clearing sideeffect of require in Carp
p4raw-id: //depot/perl@5128
Diffstat (limited to 'lib/Carp.pm')
-rw-r--r-- | lib/Carp.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Carp.pm b/lib/Carp.pm index eaa4d53d8a..43524ddbe5 100644 --- a/lib/Carp.pm +++ b/lib/Carp.pm @@ -94,7 +94,7 @@ sub export_fail { # each function call on the stack. sub longmess { - require Carp::Heavy; + { local $@; require Carp::Heavy; } # XXX fix require to not clear $@? goto &longmess_heavy; } @@ -106,7 +106,7 @@ sub longmess { # you always get a stack trace sub shortmess { # Short-circuit &longmess if called via multiple packages - require Carp::Heavy; + { local $@; require Carp::Heavy; } # XXX fix require to not clear $@? goto &shortmess_heavy; } |