X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCarp%2FHeavy.pm;h=a3d951b08c0ab6a62fc934d25478f38b0f0aadd9;hb=0064a8a9866779dceb087452b9bfaa733c51adce;hp=36bdcd49a3648410f87575457023543ca9eed30c;hpb=fbb63a9e8bf07b6f1dccaccb6b70a9ad58efc968;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm index 36bdcd4..a3d951b 100644 --- a/lib/Carp/Heavy.pm +++ b/lib/Carp/Heavy.pm @@ -1,8 +1,18 @@ +# Carp::Heavy uses some variables in common with Carp. package Carp; -our $MaxEvalLen; -our $MaxLenArg; -our $Verbose; +=head1 NAME + +Carp heavy machinery - no user serviceable parts inside + +=cut + +# use strict; # not yet + +# On one line so MakeMaker will see it. +use Carp; our $VERSION = $Carp::VERSION; + +our ($CarpLevel, $MaxArgNums, $MaxEvalLen, $MaxLenArg, $Verbose); sub caller_info { my $i = shift(@_) + 1; @@ -38,7 +48,7 @@ sub format_arg { $arg = 'undef'; } elsif (ref($arg)) { - $arg .= ''; # Make it a string; + $arg = defined($overload::VERSION) ? overload::StrVal($arg) : "$arg"; } $arg =~ s/'/\\'/g; $arg = str_len_trim($arg, $MaxLenArg);