From: Gurusamy Sarathy Date: Mon, 26 Jul 1999 12:55:43 +0000 (+0000) Subject: avoid infinite recursion when Thread.pm croaks during X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1db3cb89016a615d369dea3fa516d86032e20043;p=p5sagit%2Fp5-mst-13.2.git avoid infinite recursion when Thread.pm croaks during bootstrap p4raw-id: //depot/perl@3775 --- diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm index 0672efe..ae662c1 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; }