[Petal] broken tests?

Fergal Daly fergal at esatclear.ie
Thu Aug 12 14:00:23 BST 2004


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



More information about the Petal mailing list