Skip Menu |

This queue is for tickets about the Test-Tester CPAN distribution.

Report information
The Basics
Id: 72707
Status: resolved
Priority: 0/
Queue: Test-Tester

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.107
Fixed in: (no value)



Subject: Don't turn on threads
Test::Tester::Capture turns on threads if Perl is configured to have them. This is not necessary to support threads, the test just has to load them before Test::Tester (same as Test::More). It is impolite for a module to load threads if they're not going to use them and can change the result of a test. It can also confuse other modules which may load threads::shared before Test::Tester (ie. threads::shared looks to see if threads are on only once, when it's first loaded). Specifically, it can confuse Test::Builder which can load threads::shared BEFORE Test::Tester::Capture (loaded via Test::Tester::CaptureRunner). It only happens to work now because Test::Builder currently doesn't load threads::shared unless threads are already enabled in the process. Patch attached. This affects Test::Builder1.5, and any module which uses Test::Tester. It would help the effort if a release could be made as soon as you have a chance. Thank you very much.
Subject: ttcapture.patch
diff --git a/lib/Test/Tester/Capture.pm b/lib/Test/Tester/Capture.pm index b1b4de6..a349e3d 100644 --- a/lib/Test/Tester/Capture.pm +++ b/lib/Test/Tester/Capture.pm @@ -11,7 +11,6 @@ use vars qw( @ISA ); BEGIN { use Config; if( $] >= 5.008 && $Config{useithreads} ) { - require threads; require threads::shared; threads::shared->import; }
0.108 is working its way through PAUSE.