load threads so it doesn't abort with no threads
authorTony Cook <tony@develop=help.com>
Tue, 1 Dec 2009 06:37:10 +0000 (06:37 +0000)
committerTony Cook <tony@develop=help.com>
Tue, 1 Dec 2009 06:37:10 +0000 (06:37 +0000)
Changes
t/t99thread.t

diff --git a/Changes b/Changes
index 323be6d09daf7976b2418a65bfcc59d632fc1e76..8b4a236f1979f880707608fcabacc96d3bda6144 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,10 @@
 Imager release history.  Older releases can be found in Changes.old
 
+Imager 0.71_02 - 1 Dec 2009
+==============
+
+ - adjust the way we load the threads module for the threads test
+
 Imager 0.71_01 - 30 Nov 2009
 ===========
 
index b9ddbecd1a53f83d577387d4933ba4ae2cdcc0dc..d7fe820ffb012f879386e554c8a66a3ca184f32c 100644 (file)
@@ -3,8 +3,13 @@ use strict;
 use Imager;
 use Imager::Color::Float;
 use Imager::Fill;
-use threads;
 use Config;
+BEGIN {
+  if ($Config{useithreads}) {
+    require threads;
+    threads->import;
+  }
+}
 use Test::More;
 
 $Config{useithreads}