From: Tony Cook Date: Fri, 4 Dec 2009 14:16:10 +0000 (+0000) Subject: more threads tests adjustments X-Git-Tag: Imager-0.72~2 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/1a8a062587c0ff3e4c5463c7198e85bca5ab1451 more threads tests adjustments --- diff --git a/t/t99thread.t b/t/t99thread.t index d7fe820f..55562246 100644 --- a/t/t99thread.t +++ b/t/t99thread.t @@ -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;