diff options
author | Ben Tilly <ben_tilly@operamail.com> | 2001-12-02 06:32:51 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-02 16:55:21 +0000 |
commit | c01c1f0dc3aef0fc53c73558fd9554442d6c8540 (patch) | |
tree | b14160a2e62cc85540fd01f89f8d42949e3327ae /lib | |
parent | af89d9af4fcb4773bc931a5c06f9c069c444462b (diff) | |
download | perl-c01c1f0dc3aef0fc53c73558fd9554442d6c8540.tar.gz |
RE: More verbose POD for Carp
Message-ID: <3C0A9748@operamail.com>
p4raw-id: //depot/perl@13426
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Carp.pm | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/Carp.pm b/lib/Carp.pm index 84508b20da..5dbae299fd 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(@_); } |