Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Deep CPAN distribution.

Report information
The Basics
Id: 4081
Status: rejected
Priority: 0/
Queue: Test-Deep

Owner: Nobody in particular
Requestors: schwern [...]

Bug Information
Severity: Normal
Broken in: 0.081
Fixed in: (no value)

Subject: t/isa.t failed
Download (untitled) / with headers
text/plain 489b
This is with the stock 5.6.0 that comes with OS X 10.2.8. t/isa............# Failed test (t/isa.t at line 67) # got: '0' # expected: '1' # Failed test (t/isa.t at line 67) # Got diag (72 bytes): # Checking class of $data with isa() # got : B=HASH(0x6620) # expect : 'A' # # Expected diag (0 bytes): # # Looks like you failed 2 tests of 21. dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 19-20 Failed 2/21 tests, 90.48% okay
From: Fergal Daly <fergal [...]>
To: bug-Test-Deep [...]
Subject: Re: [cpan #4081] t/isa.t failed
Date: Sun, 12 Oct 2003 22:50:59 +0100
Download (untitled) / with headers
text/plain 874b
Seems that isa results are cached or something. Run the code below for a demo. Also if you implement isa_A using Test::More::isa_ok you see the same result. Any suggestions? It's easy enough to fix the test script by using another package but that seems like cheating... my $b = bless {}, "B"; my $c = bless {}, "C"; A::isa_A($b); # no @B::ISA = ("A"); $b->isa_A; # still no @C::ISA = ("A"); $c->isa_A; # yes @C::ISA = (); A::isa_A($c); # still yes $c->isa_A; # dead package A; sub isa_A { my $thing = shift; print "$thing "; print UNIVERSAL::isa($thing, "A") ? "is" : "isn't"; print " an A\n"; } my $b = bless {}, "B"; A::isa_A($b); @B::ISA = ("A"); $b->isa_A; package A; sub isa_A { my $thing = shift; print "$thing "; print UNIVERSAL::isa($thing, "A") ? "is" : "isn't"; print " an A\n"; }
Download (untitled) / with headers
text/plain 128b
Oops, In the code in the last message, ignore the stuff below the first sub isa_a, it's code I forgot to delete before sending.
Download (untitled) / with headers
text/plain 158b
This behavior is ancient and long-since fixed in perl. A future Test-Deep release is likely to require 5.8, as much of the toolchain already does. -- rjbs

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to