X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCarp.pm;h=69d477b486e16c55151d4c529fcbd8e0f179b9e2;hb=0064a8a9866779dceb087452b9bfaa733c51adce;hp=eaa4d53d8a3b6cc42e29441b15e07e53f407fc7f;hpb=3b5ca523bc72bce199abcb9d5ec13af5913a4d2d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Carp.pm b/lib/Carp.pm index eaa4d53..69d477b 100644 --- a/lib/Carp.pm +++ b/lib/Carp.pm @@ -1,5 +1,7 @@ package Carp; +our $VERSION = '1.00'; + =head1 NAME carp - warn of errors (from perspective of caller) @@ -68,6 +70,8 @@ $MaxArgLen = 64; # How much of each argument to print. 0 = all. $MaxArgNums = 8; # How many arguments to print. 0 = all. $Verbose = 0; # If true then make shortmess call longmess instead +$CarpInternal{Carp}++; + require Exporter; @ISA = ('Exporter'); @EXPORT = qw(confess croak carp); @@ -94,7 +98,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 +110,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; }