Skip Menu |

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

Report information
The Basics
Id: 14443
Status: resolved
Worked: 2.3 hours (140 min)
Priority: 0/
Queue: Test-MockObject

People
Owner: chromatic [...] cpan.org
Requestors: adamk [...] cpan.org
Cc:
AdminCc:

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



Subject: Interactions with UNIVERSAL::can results in debugger explosions
For some reason, Test::MockObject behaves differently in the debugger to normal code. This would seem to be due to some strange interaction and feedback with UNIVERSAL::can. It falsely throws the following Called UNIVERSAL::can() as a function, not a method at ../lib/Test/MockObject.pm line 118 UNIVERSAL::can::can() called at ../lib/Test/MockObject.pm line 118 Test::MockObject::__ANON__[../lib/Test/MockObject.pm:119]() called at ../lib/Test/MockObject/Extends.pm line 90 Test::MockObject::Extends::__ANON__[../lib/Test/MockObject/Extends.pm:108]() called at t/extends.t line 57 In combination with Test::Warn, this results in all tests dying, and makes it extraordinarily difficult to do debugging of test scripts.
This appears to be a problem with the debugger and its interaction with caller(), in that when the debugger is active, the call stack doesn't seem to contain the *__ANON__ glob for the name of anonymous subroutines. I'll report this to p5p in a moment.
I fixed this in version 1.05 and added a test so it should never reoccur.