develooper Front page | perl.perl5.porters | Postings from August 2009

[rt.cpan.org #48570] Incorrectly skips tests (UNKNOWN) when it should do an NA

Thread Previous
From:
Jerry D. Hedden via RT
Date:
August 11, 2009 02:39
Subject:
[rt.cpan.org #48570] Incorrectly skips tests (UNKNOWN) when it should do an NA
Message ID:
rt-3.6.HEAD-26882-1249906519-1332.48570-7-0@rt.cpan.org
<URL: https://rt.cpan.org/Ticket/Display.html?id=48570 >

On Mon Aug 10 01:14:50 2009, ADAMK wrote:
> The threads module is invalid if the Perl it is installed into does not
> have thread support.
> 
> And yet, it will still build and test even when not on a threading Perl.
> 
> This results in a large number of false-UNKNOWN (which basically says
> "Testing was unreliable for this, or crashed") results for this module.
> 
> What it probably should do instead is to check for thread support during
> the Makefile.PL and return NA if the Perl does not support threads.
> 
> (This is usually done by returning success exit(0) without generating a
> Makefile)

The original philosophy for this module is that 'threads' and its ilk
are allowed to be installed in an unthreaded Perl.  threads.pm checks if
the Perl is threaded, and 'die's if it is not.  This allows apps to be
written such that they can be supported on both threaded and unthreaded
Perls using a construct similar to this:

my $i_am_threaded;
BEGIN {
  $i_am_threaded = eval 'use threads; 1';
}

Backward compatibility concerns also dictate that this behavior not be
modified.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About