in reply to Re: changing object's methods at runtime
in thread changing object's methods at runtime
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.
|
---|