From: Ben Tilly Date: Sun, 2 Dec 2001 11:32:51 +0000 (-0500) Subject: RE: More verbose POD for Carp X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c01c1f0dc3aef0fc53c73558fd9554442d6c8540;p=p5sagit%2Fp5-mst-13.2.git RE: More verbose POD for Carp Message-ID: <3C0A9748@operamail.com> p4raw-id: //depot/perl@13426 --- diff --git a/lib/Carp.pm b/lib/Carp.pm index 84508b2..5dbae29 100644 --- a/lib/Carp.pm +++ b/lib/Carp.pm @@ -155,7 +155,15 @@ sub export_fail { sub longmess { { local $@; require Carp::Heavy; } # XXX fix require to not clear $@? - goto &longmess_heavy; + # Icky backwards compatibility wrapper. :-( + my $call_pack = caller(); + if ($Internal{$call_pack} or $CarpInternal{$call_pack}) { + return longmess_heavy(@_); + } + else { + local $CarpLevel = $CarpLevel + 1; + return longmess_heavy(@_); + } } @@ -167,7 +175,10 @@ sub longmess { sub shortmess { # Short-circuit &longmess if called via multiple packages { local $@; require Carp::Heavy; } # XXX fix require to not clear $@? - goto &shortmess_heavy; + # Icky backwards compatibility wrapper. :-( + my $call_pack = caller(); + local @CARP_NOT = caller(); + shortmess_heavy(@_); }