At 2:35 PM -0400 10/3/07, DAGOLDEN wrote:
On 10/3/07, Elizabeth Mattijsen <[EMAIL PROTECTED]> wrote:
If anyone knows how to tell that a threaded Perl is required?
Requiring the "threads" module is *not* a solution (at least, it
didn't use to be).
I believe that you can check $Config{useithreads}. If that's true,
then threads are available.
If you're asking about how a Makefile.PL should respond if a module
needs threads, you should just print a notice about it and "exit 0"
before the Makefile.PL is created. (This will work for CPANPLUS and
recent versions of CPAN.)
# Makefile.PL
use Config;
if ( $Config{useithreads} ) {
print "This module requires a version of perl that has threads.\n";
exit 0;
}
# rest of Makefile.PL continues as normal
I assume the check would be
if ( !$Config{useithreads} ) {
;-)
I made the necessary changes to Thread::Queue::Any,
Thread::Queue::Monitored and Thread::Queue::Any::Monitored and seeded
these out to CPAN. Hope this will fix the false positives on the
CPAN Testers list...
Thanks for the suggestion!
Liz