]> git.imager.perl.org - imager.git/commitdiff
more threads tests adjustments
authorTony Cook <tony@develop=help.com>
Fri, 4 Dec 2009 14:16:10 +0000 (14:16 +0000)
committerTony Cook <tony@develop=help.com>
Fri, 4 Dec 2009 14:16:10 +0000 (14:16 +0000)
t/t99thread.t

index d7fe820ffb012f879386e554c8a66a3ca184f32c..555622463083a75b1e3ba4a57794bc14296751d4 100644 (file)
@@ -4,16 +4,25 @@ use Imager;
 use Imager::Color::Float;
 use Imager::Fill;
 use Config;
+my $loaded_threads;
 BEGIN {
-  if ($Config{useithreads}) {
-    require threads;
-    threads->import;
+  if ($Config{useithreads} && $] > 5.008007) {
+    $loaded_threads =
+      eval {
+       require threads;
+       threads->import;
+       1;
+      };
   }
 }
 use Test::More;
 
 $Config{useithreads}
   or plan skip_all => "can't test Imager's lack of threads support with no threads";
+$] > 5.008007
+  or plan skip_all => "require a perl with CLONE_SKIP to test Imager's lack of threads support";
+$loaded_threads
+  or plan skip_all => "couldn't load threads";
 
 plan tests => 11;