From 0bcd2fea6bc6ecdf03a0c2410ba83be70e2072dc Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Fri, 18 Feb 2000 06:55:33 +0000 Subject: avoid $@-clearing sideeffect of require in Carp p4raw-id: //depot/perl@5128 --- lib/Carp.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Carp.pm') 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; } -- cgit v1.2.1