Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 8409
Status: resolved
Priority: 0/
Queue: Test-Simple

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

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



Subject: [PATCH] threads.pm should not be a mandatory prerequisite
--- Builder.pm.orig Sat Nov 13 17:09:58 2004 +++ Builder.pm Sat Nov 13 17:12:08 2004 @@ -16,15 +16,16 @@ # Make Test::Builder thread-safe for ithreads. BEGIN { use Config; - if( $] >= 5.008 && $Config{useithreads} ) { + local $@; + ( $] >= 5.008 and $Config{useithreads} and eval { require threads; require threads::shared; threads::shared->import; - } - else { + 1; + } ) or do { *share = sub { 0 }; *lock = sub { 0 }; - } + }; } use vars qw($Level);
--- Builder.pm.orig Sat Nov 13 17:09:58 2004 +++ Builder.pm Sat Nov 13 17:12:08 2004 @@ -16,15 +16,16 @@ # Make Test::Builder thread-safe for ithreads. BEGIN { use Config; - if( $] >= 5.008 && $Config{useithreads} ) { + local $@; + ( $] >= 5.008 and $Config{useithreads} and eval { require threads; require threads::shared; threads::shared->import; - } - else { + 1; + } ) or do { *share = sub { 0 }; *lock = sub { 0 }; - } + }; } use vars qw($Level);