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

Regards,
David

Reply via email to