Skip Menu |
 

This queue is for tickets about the UNIVERSAL-isa CPAN distribution.

Report information
The Basics
Id: 74766
Status: resolved
Priority: 0/
Queue: UNIVERSAL-isa

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Download (untitled) / with headers
text/plain 754b
Please see https://rt.cpan.org/Ticket/Display.html?id=74760 -- although I have patched Test::Deep to not call UNIVERSAL::isa or ::can as functions, it still will not coexist with Test::MockObject, because of this check in UNIVERSAL::isa: sub object_or_class { local $@; local $recursing = 1; if ( my $override = eval { $_[0]->can('isa') } ) { unless ( $override == \&UNIVERSAL::isa ) # ^^^ this check here ^^^ still fails However, Test::Deep::isa does goto &UNIVERSAL::isa if @_ == 1, so it is behaving nicely. Comments? Would you have any objections to modifying this check to also compare against \&Test::Deep::isa? Do you have any other suggestions for dealing with this problem?
Download (untitled) / with headers
text/plain 751b
Further, the documentation says: "After version 1.00, warnings only appear when naughty code calls UNIVERSAL::isa() as a function on an invocant for which there is an overridden isa(). These are really truly active bugs, and you should fix them rather than relying on this module to find them." This does not appear to be true - I see object_or_class() being called even when isa() was called as a method, and there is no "was I called as a method?" logic in this function either. Consequently, any call to ->isa() from a namespace with an overridden isa() will trigger this warning, no matter how it was called. Therefore, this still means that any package that uses Test::Deep cannot also use UNIVERSAL::isa (therefore ruling out Test::Mock). :(
Download (untitled) / with headers
text/plain 282b
This was only a problem in Test::MockObject 1.09, which always loads UNIVERSAL::isa. In 1.20110612, UNIVERSAL::isa is not loaded by default, which solves the problem. This ticket can now be closed; thank you doy for being patient and pointing this out to me (more than once) :) :)


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.