(Replaced by #4265.)
[p5sagit/p5-mst-13.2.git] / lib / Carp / Heavy.pm
index 0672efe..161e7fb 100644 (file)
@@ -1,4 +1,19 @@
 package Carp;
+
+=head1 NAME
+
+Carp::Heavy - Carp guts
+
+=head1 SYNOPIS
+
+(internal use only)
+
+=head1 DESCRIPTION
+
+No user-serviceable parts inside.
+=cut
+
 # This package is heavily used. Be small. Be fast. Be good.
 
 # Comments added by Andy Wardley <abw@kfs.org> 09-Apr-98, based on an
@@ -95,7 +110,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 +195,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;
            }