http://www.perlmonks.org?node_id=948732


in reply to Safer monkey-patching

Isn't the Factory_design_pattern also a solution to this? (It requires a complete rewrite of the original class, though :-)

Replies are listed 'Best First'.
Re^2: Safer monkey-patching
by tobyink (Canon) on Jan 19, 2012 at 10:21 UTC

    If we were able to rewrite the original class, then we wouldn't be in this situation.

      Well, yeah. But if we write our classes using Factories, we do not get anyone into the situation.