On Fri, 2004-08-27 at 01:09, Andrew Pimlott wrote:
> I would still prefer that Test::Builder not use threads if I don't ask
> for it.
if( $] >= 5.008 && $Config{useithreads} ) {
require threads;
require threads::shared;
threads::shared->import;
}
If you don't have an ithreads-capable Perl, T::B won't use threads.
If you do, it must, because it has global data to which all threads need
access. T::B can't know how people will call it, so it takes the
approach of being safe and at least attempting to work on both threaded
and non-threaded Perls.
Requiring a compile-time flag isn't a solution because you don't know
*how* other people will use your code, the characteristics of their
installations, or what other modules they will have installed.
-- c