in reply to Re^4: ISA but no farther?
in thread ISA but no farther?
As a variation on ysth's suggestion, you could require that the mocking class implement the 'mocks' method:
ref($obj) eq 'OP' || $obj->can('mocks') && $obj->mocks('OP')Of course, if 'mocks' it handled through AUTOLOAD, this will fail.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: ISA but no farther?
by diotalevi (Canon) on Jul 20, 2006 at 18:22 UTC | |
by jhourcle (Prior) on Jul 20, 2006 at 19:43 UTC | |
by ysth (Canon) on Jul 20, 2006 at 20:28 UTC |