X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FThread.pm;h=fc39769002729234e35ac03dcd662ccab45e6725;hb=6bcc4512882cbfb9a802c28116e3f7a01455c5f8;hp=4e88706cebb8116f87b2d3f1dce07fab83234ace;hpb=8a20485cc87712d932e15dd6a022b0240d779a6f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Thread.pm b/lib/Thread.pm index 4e88706..fc39769 100644 --- a/lib/Thread.pm +++ b/lib/Thread.pm @@ -1,13 +1,11 @@ package Thread; -$VERSION = '2.00'; - use strict; -our $ithreads; -our $othreads; +our($VERSION, $ithreads, $othreads); BEGIN { + $VERSION = '2.00'; use Config; $ithreads = $Config{useithreads}; $othreads = $Config{use5005threads}; @@ -15,7 +13,7 @@ BEGIN { require Exporter; use XSLoader (); -our($VERSION, @ISA, @EXPORT, @EXPORT_OK); +our(@ISA, @EXPORT, @EXPORT_OK); @ISA = qw(Exporter); @@ -315,6 +313,10 @@ sub unimplement { BEGIN { if ($ithreads) { + if ($othreads) { + require Carp; + Carp::croak("This Perl has both ithreads and 5005threads (serious malconfiguration)"); + } XSLoader::load 'threads'; for my $m (qw(new join detach yield self tid equal)) { no strict 'refs'; @@ -332,7 +334,7 @@ BEGIN { unimplement(qw(unlock)); } else { require Carp; - Carp::croak("This Perl has neither ithreads not 5005threads"); + Carp::croak("This Perl has neither ithreads nor 5005threads"); } }