in reply to Re^7: ISA but no farther?
in thread ISA but no farther?

Test::MockObject doesn't keep track of the class; you'd have to add a mocks method to it and call ->mocks('OP') in your test script and ->mocks() eq 'OP' in the actual module.

Test::MockObject::Extends does keep track, in @{ref($obj)."::ISA"}, but you'd have to say ref($obj) =~ /^T::MO::E::/ to detect a mock object.

If people really do need to check for non-subclassed classes, both Test::MockObject types ought to be fixed to make this painless. But I still don't see why that would be necessary.