From: Gurusamy Sarathy Date: Fri, 18 Feb 2000 06:55:33 +0000 (+0000) Subject: avoid $@-clearing sideeffect of require in Carp X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0bcd2fea6bc6ecdf03a0c2410ba83be70e2072dc;p=p5sagit%2Fp5-mst-13.2.git avoid $@-clearing sideeffect of require in Carp p4raw-id: //depot/perl@5128 --- diff --git a/lib/Carp.pm b/lib/Carp.pm index eaa4d53..43524dd 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; }