summaryrefslogtreecommitdiff
path: root/lib/Carp
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-07-26 12:55:43 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-07-26 12:55:43 +0000
commit1db3cb89016a615d369dea3fa516d86032e20043 (patch)
tree84ebedff597807eec01c49ffe6e1892a4bebfd80 /lib/Carp
parent3b5ca523bc72bce199abcb9d5ec13af5913a4d2d (diff)
downloadperl-1db3cb89016a615d369dea3fa516d86032e20043.tar.gz
avoid infinite recursion when Thread.pm croaks during
bootstrap p4raw-id: //depot/perl@3775
Diffstat (limited to 'lib/Carp')
-rw-r--r--lib/Carp/Heavy.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm
index 0672efea7d..ae662c1f26 100644
--- a/lib/Carp/Heavy.pm
+++ b/lib/Carp/Heavy.pm
@@ -95,7 +95,7 @@ sub longmess_heavy {
# here's where the error message, $mess, gets constructed
$mess .= "\t$sub " if $error eq "called";
$mess .= "$error at $file line $line";
- if (exists $main::{'Thread::'}) {
+ if (defined &Thread::tid) {
my $tid = Thread->self->tid;
$mess .= " thread $tid" if $tid;
}
@@ -180,7 +180,7 @@ sub shortmess_heavy { # Short-circuit &longmess if called via multiple packages
# remove them first.
my $msg;
$msg = "$error at $file line $line";
- if (exists $main::{'Thread::'}) {
+ if (defined &Thread::tid) {
my $tid = Thread->self->tid;
$mess .= " thread $tid" if $tid;
}