Just another Perl shrine | |
PerlMonks |
Re^2: changing object's methods at runtimeby adrianh (Chancellor) |
on May 21, 2003 at 20:19 UTC ( [id://259868]=note: print w/replies, xml ) | Need Help?? |
Overriding one instance's methods at runtime is not directly possible, unless I'm mistaken (which is entirely possible and often even likely). While not the best solution in this instance (I'd subclass or go with Test::MockObject) it is possible to override methods at runtime - and it can occasionally be useful. See Micro Mocking: using local to help test subs for some examples.
In Section
Seekers of Perl Wisdom
|
|