Re: [perl #36622] y/// at end of file
[p5sagit/p5-mst-13.2.git] / t / op / threads.t
index 02ae213..b8fb9a6 100644 (file)
@@ -1,7 +1,7 @@
 #!./perl
 BEGIN {
      chdir 't' if -d 't';
-     unshift @INC, '../lib';
+     @INC = '../lib';
      require './test.pl';      # for which_perl() etc
 }
 
@@ -13,13 +13,13 @@ BEGIN {
        print "1..0 # Skip: no ithreads\n";
        exit 0;
      }
-     eval 'use threads';
-     if ($@ =~ /dynamic loading not available/) {
-       print "1..0 # Skip: miniperl can't load threads\n";
-       exit 0;
+     if ($ENV{PERL_CORE_MINITEST}) {
+       print "1..0 # Skip: no dynamic loading on miniperl, no threads\n";
+       exit 0;
      }
      plan(3);
 }
+use threads;
 
 # test that we don't get:
 # Attempt to free unreferenced scalar: SV 0x40173f3c