From 61ff77f9f4f8310a58dbf7f4fc482d7459648498 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Fri, 4 Feb 2011 20:30:19 -0800 Subject: [PATCH] I now enforce a threaded perl during testing, not during execution. This should pacify cpantesters --- bin/feedGnuplot | 8 -------- t/00-load.t | 9 +++++++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/bin/feedGnuplot b/bin/feedGnuplot index 70309a5..c17cbe3 100755 --- a/bin/feedGnuplot +++ b/bin/feedGnuplot @@ -6,14 +6,6 @@ use Time::HiRes qw( usleep ); use IO::Handle; use List::MoreUtils qw( first_index ); use Text::ParseWords; - -use Config; -if (! $Config{'useithreads'}) -{ - print "I require a threaded perl\n"; - exit(0); -} - use threads; use threads::shared; use Thread::Queue; diff --git a/t/00-load.t b/t/00-load.t index 5687318..0b057f8 100644 --- a/t/00-load.t +++ b/t/00-load.t @@ -1,5 +1,14 @@ #!/usr/bin/perl +# require a threaded perl for my tests. This block lifted verbatim from the cpantesters wiki +BEGIN { + use Config; + if (! $Config{'useithreads'}) { + print("1..0 # Skip: Perl not compiled with 'useithreads'\n"); + exit(0); + } +} + use Test::More tests => 1; use Test::Script::Run;