http://qs321.pair.com?node_id=504481


in reply to New Module Announcement: Object::InsideOut

I tried to build this on AS810 (5.8.4) and I am getting test failures in 03-threads.t.

C:\Perl\packages\Object-InsideOut-0.02.00>nmake test Microsoft (R) Program Maintenance Utility Version 8.00.40607.16 Copyright (C) Microsoft Corporation. All rights reserved. C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harn +ess(0, 'bl +ib\lib', 'blib\arch')" t\01-basic.t t\02-auto.t t\03-threads.t t\04-s +hared.t t\01-basic......Can't locate Exception/Class.pm in @INC (@INC contains +: C:\Perl\ +packages\Object-InsideOut-0.02.00\blib\lib C:\Perl\packages\Object-In +sideOut-0. +0 BEGIN failed--compilation aborted at C:\Perl\packages\Object-InsideOut +-0.02.00\b +lib\lib/Object/InsideOut.pm line 55. Compilation failed in require at t\01-basic.t line 7. BEGIN failed--compilation aborted at t\01-basic.t line 7. t\01-basic......dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 1-23 Failed 23/23 tests, 0.00% okay t\02-auto.......Can't locate Exception/Class.pm in @INC (@INC contains +: C:\Perl\ +packages\Object-InsideOut-0.02.00\blib\lib C:\Perl\packages\Object-In +sideOut-0. +0 BEGIN failed--compilation aborted at C:\Perl\packages\Object-InsideOut +-0.02.00\b +lib\lib/Object/InsideOut.pm line 55. Compilation failed in require at t\02-auto.t line 7. BEGIN failed--compilation aborted at t\02-auto.t line 7. t\02-auto.......dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 1-6 Failed 6/6 tests, 0.00% okay t\03-threads....Can't locate Exception/Class.pm in @INC (@INC contains +: C:\Perl\ +packages\Object-InsideOut-0.02.00\blib\lib C:\Perl\packages\Object-In +sideOut-0. +0 BEGIN failed--compilation aborted at C:\Perl\packages\Object-InsideOut +-0.02.00\b +lib\lib/Object/InsideOut.pm line 55. Compilation failed in require at t\03-threads.t line 18. BEGIN failed--compilation aborted at t\03-threads.t line 18. t\03-threads....dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 1-12 Failed 12/12 tests, 0.00% okay t\04-shared.....Can't locate Exception/Class.pm in @INC (@INC contains +: C:\Perl\ +packages\Object-InsideOut-0.02.00\blib\lib C:\Perl\packages\Object-In +sideOut-0. +0 BEGIN failed--compilation aborted at C:\Perl\packages\Object-InsideOut +-0.02.00\b +lib\lib/Object/InsideOut.pm line 55. Compilation failed in require at t\04-shared.t line 23. BEGIN failed--compilation aborted at t\04-shared.t line 23. t\04-shared.....dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 1-12 Failed 12/12 tests, 0.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t\01-basic.t 2 512 23 46 200.00% 1-23 t\02-auto.t 2 512 6 12 200.00% 1-6 t\03-threads.t 2 512 12 24 200.00% 1-12 t\04-shared.t 2 512 12 24 200.00% 1-12 Failed 4/4 test scripts, 0.00% okay. 53/53 subtests failed, 0.00% okay +. NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x2' Stop.

Tracing the testscript through, the failure appears to be when the test for is_sharing() is called at InsideOut.pm(388):

# Share the hash, if applicable if (is_sharing($pkg)) { threads::shared::share($hash) }

and

sub is_sharing : PRIVATE { my $class = $_[0]; # If not 'use threads::shared;', return false if (! $threads::shared::threads_shared) { return; } return ($IS_SHARING{$class}->[0]); }

The if suceeds, so the function returns undef with the result that the hash is not shared.

Without claiming to have read or traced every line, I cannot see anywhere in InsideOut.pm where threads::shared is ever used or required. What am I missing?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: New Module Announcement: Object::InsideOut
by jdhedden (Deacon) on Nov 01, 2005 at 05:47 UTC
    All the failures you received were due to your not having Exception::Class installed ("Can't locate Exception/Class.pm in @INC"), and had nothing to do with the presense or absense of threads::shared.

    As to your question concerning threads::shared, it is documented in the POD, namely, the application must use threads::shared;. t/03-threads.t is testing threads without object sharing and thus does not use threads::shared. However, t/04-shared.t does. Hope that helps.


    Remember: There's always one more bug.

      I do apologise, it appears I c&p'd the wrong log. This is the one I should have posted

      C:\Perl\packages\Object-InsideOut-0.02.00>perl -MException::Class -wle +"print $Exception::Class::VERSION" 1.22 C:\Perl\packages\Object-InsideOut-0.02.00>nmake test Microsoft (R) Program Maintenance Utility Version 8.00.40607.16 Copyright (C) Microsoft Corporation. All rights reserved. C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harn +ess(0, 'blib\lib', 'blib\arch')" t\01-basic.t t\02-auto.t t\03-thread +s.t t\04-shared.t t\01-basic......ok t\02-auto.......ok t\03-threads....ok 3/12thread failed to start: Can't locate object met +hod "x" via package "UNIVERSAL" at t\03-threads.t line 48. t\03-threads....ok 5/12# Looks like you planned 12 tests but only ran +6. t\03-threads....dubious Test returned status 6 (wstat 1536, 0x600) DIED. FAILED tests 7-12 Failed 6/12 tests, 50.00% okay t\04-shared.....ok Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t\03-threads.t 6 1536 12 12 100.00% 7-12 Failed 1/4 test scripts, 75.00% okay. 6/53 subtests failed, 88.68% oka +y. NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0xff' Stop.

      As you can see, I have installed Exception::Class, but I am still getting failures from 03threads.t


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        This looks to be a bug in Perl and may be related to this bug fix reported in perl585delta.pod:
        Creating a new thread when weak references exist was buggy, and would often cause warnings at interpreter destruction time.
        I'll investigate this further. Thanks.

        Update:
        After further investigation, I'm fairly sure this is a Perl bug. I could not reproduce the error you received under Cygwin or Solaris, but I did reproduce the warnings mentioned in the quote above. Further, 03-threads.t and 04-shared.t are nearly the same, and 04-shared.t successed for you. I can only recommend upgrading to Perl 5.8.7 if you can.

        I'll make note of these sorts of issues in the bug section of the POD.


        Remember: There's always one more bug.