summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-05-07 04:01:38 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-05-07 04:01:38 +0000
commit0aa0096c796aa2a7b13a25bca62505f1b99f6734 (patch)
treea2ca95bc5f90b812735f622019cebe8529fc7dca /lib
parent101e51674871122572db1eb9982dc8d132eb2ae9 (diff)
downloadperl-0aa0096c796aa2a7b13a25bca62505f1b99f6734.tar.gz
remove outdated kludge in Carp (NULLs are permitted in diagnostics now)
p4raw-id: //depot/perl@6079
Diffstat (limited to 'lib')
-rw-r--r--lib/Carp/Heavy.pm12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm
index 5e3de49418..8cfdcb48f0 100644
--- a/lib/Carp/Heavy.pm
+++ b/lib/Carp/Heavy.pm
@@ -42,7 +42,7 @@ sub longmess_heavy {
#
# if the $error error string is newline terminated then it
# is copied into $mess. Otherwise, $mess gets set (at the end of
- # the 'else {' section below) to one of two things. The first time
+ # the 'else' section below) to one of two things. The first time
# through, it is set to the "$error at $file line $line" message.
# $error is then set to 'called' which triggers subsequent loop
# iterations to append $sub to $mess before appending the "$error
@@ -121,10 +121,7 @@ sub longmess_heavy {
# $line" makes sense as "called at $file line $line".
$error = "called";
}
- # this kludge circumvents die's incorrect handling of NUL
- my $msg = \($mess || $error);
- $$msg =~ tr/\0//d;
- $$msg;
+ $mess || $error;
}
@@ -227,9 +224,7 @@ CALLER:
}
else {
# OK! We've got a candidate package. Time to construct the
- # relevant error message and return it. die() doesn't like
- # to be given NUL characters (which $msg may contain) so we
- # remove them first.
+ # relevant error message and return it.
my $msg;
$msg = "$error at $file line $line";
if (defined &Thread::tid) {
@@ -237,7 +232,6 @@ CALLER:
$mess .= " thread $tid" if $tid;
}
$msg .= "\n";
- $msg =~ tr/\0//d;
return $msg;
}
}