summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-12-05 16:30:21 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-05 16:30:21 +0000
commitfbb63a9e8bf07b6f1dccaccb6b70a9ad58efc968 (patch)
tree3b8b3d028642b3942f77677990540df276bce4d6 /lib
parent66a4a569cc2ea11fe85bfadbec79dcd4fbf36d17 (diff)
downloadperl-fbb63a9e8bf07b6f1dccaccb6b70a9ad58efc968.tar.gz
Fix a manual edit typo from #7993, fix the message formatting
for Unicode, add few our declarations. p4raw-id: //depot/perl@7994
Diffstat (limited to 'lib')
-rw-r--r--lib/Carp/Heavy.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm
index d7b8990b6e..36bdcd49a3 100644
--- a/lib/Carp/Heavy.pm
+++ b/lib/Carp/Heavy.pm
@@ -1,5 +1,8 @@
package Carp;
+our $MaxEvalLen;
+our $MaxLenArg;
+our $Verbose;
sub caller_info {
my $i = shift(@_) + 1;
@@ -46,8 +49,7 @@ sub format_arg {
# The following handling of "control chars" is direct from
# the original code - I think it is broken on Unicode though.
# Suggestions?
- $arg =~ s/([\200-\377])/sprintf("M-%c",ord($1)&0177)/eg;
- $arg =~ s/([\0-\37\177])/sprintf("^%c",ord($1)^64)/eg;
+ $arg =~ s/([[:cntrl:]]|[[^:ascii:]])/sprintf("\\x{%x}",ord($1))/eg;
return $arg;
}
@@ -137,6 +139,7 @@ sub ret_backtrace {
while (my %i = caller_info(++$i)) {
$mess .= "\t$i{sub_name} called at $i{file} line $i{line}$tid_msg\n";
+ }
return $mess || $err;
}