in reply to Test::MockObject subclassing befuddlement
The first test failures I get with your code are #2 and #3, testing that $c is a 'Foo'. It isn't.
A MockFoo is not a Foo. If perl thought it were, perl would burrow into the Foo namespace for methods and ignore the mocked-up ones.
I suspect your difficulty with id() comes from the closure behaving unexpectedly, but I can't prove it.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Test::MockObject subclassing befuddlement
by water (Deacon) on Jul 11, 2005 at 20:12 UTC |