summaryrefslogtreecommitdiff
path: root/lib/Thread.pm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-11-16 04:44:30 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-11-16 04:44:30 +0000
commit4038bebf1e10fe7b46c1e36dbec84ce8b696de6b (patch)
treed69c360e6b0c7a9a9f23502eeae88dfaac8a781c /lib/Thread.pm
parent48b5a746f8286bc3e3fca47b620f46546fdc8434 (diff)
downloadperl-4038bebf1e10fe7b46c1e36dbec84ce8b696de6b.tar.gz
use strict.
p4raw-id: //depot/perl@13039
Diffstat (limited to 'lib/Thread.pm')
-rw-r--r--lib/Thread.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/Thread.pm b/lib/Thread.pm
index b6be663166..d3e27e1661 100644
--- a/lib/Thread.pm
+++ b/lib/Thread.pm
@@ -2,15 +2,20 @@ package Thread;
$VERSION = '2.00';
+use strict;
+
+our $ithreads;
+our $othreads;
+
BEGIN {
use Config;
- our $ithreads = $Config{useithreads};
- our $othreads = $Config{use5005threads};
+ $ithreads = $Config{useithreads};
+ $othreads = $Config{use5005threads};
}
require Exporter;
use XSLoader ();
-our($VERSION, @ISA, @EXPORT);
+our($VERSION, @ISA, @EXPORT, @EXPORT_OK);
@ISA = qw(Exporter);
@@ -294,6 +299,7 @@ sub unimplemented {
sub unimplement {
for my $m (@_) {
+ no strict 'refs';
*{"Thread::$m"} = sub { unimplemented $m };
}
}
@@ -302,10 +308,12 @@ BEGIN {
if ($ithreads) {
XSLoader::load 'threads';
for my $m (qw(new join detach yield self tid equal)) {
+ no strict 'refs';
*{"Thread::$m"} = \&{"threads::$m"};
}
XSLoader::load 'threads::shared';
for my $m (qw(cond_signal cond_broadcast cond_wait unlock share)) {
+ no strict 'refs';
*{"Thread::$m"} = \&{"threads::shared::${m}_enabled"};
}
unimplement(qw(list done eval flags));