RE: broken tests?

Bridget Almas <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.petal
Message-ID <555F2B7B278B5348A28F665E6B0E43A40935EE9B@exchange-slc.ut.ovid.com>
It's not threads. From perl -V:
	usethreads=undef use5005threads=undef useithreads=undef 

As far as why I'm using Perl 5.8.0 ... too difficult to push through an
upgrade of perl in our Production environment right now.

If I get time, I'll try to isolate the problem with Test::More.  

Thanks for the help,
Bridget 
-----Original Message-----
From: Fergal Daly [mailto:[email protected]] 
Sent: Thursday, August 12, 2004 9:00 AM
To: Bridget Almas
Cc: Jean-Michel Hiver; [email protected]
Subject: Re: [Petal] broken tests?

On Thu, Aug 12, 2004 at 06:46:23AM -0600, Bridget Almas wrote:
> As far as I can tell, the Petal installation works just fine (I'm not
> exercising it too heavily though). If I comment out the "use Test::More"
and
> the like/unlike tests, the Petal test code also seems to work fine, so the
> problem must be in the test libraries.  I am using the latest version of
> Test::Simple (0.47) and Test::Harness (2.42).

Does your perl have thread support enabled? Try

perl -V

and see if THREAD or USE_ITHREAD is mentioned in Compile-time options.
Test-Builder (used by Test-More) calls some thread functions to make it
thread safe however I think 5.8.0 might not be the best thread-wise.

To see if this is the problem, you could change the bit at the start of
Test/Builder.pm. My one looks something like

BEGIN {
    use Config;
    if( $] >= 5.008 && $Config{useithreads} ) {
        require threads;
        require threads::shared;
        threads::shared->import;
    }
    else {
        *share = sub { 0 };
        *lock  = sub { 0 };
    }
}

changing

    if( $] >= 5.008 && $Config{useithreads} ) {

to

    if( 0 && $] >= 5.008 && $Config{useithreads} ) {

will turn off the thread stuff. If it works after that then you've found the
culprit.

Is there some particular reason you're using 5.8.0? The later versions fix a
lot of bugs and have tried to keep backwards compatibility,

F
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.