![]() |
|
Do you know where your variables are? | |
PerlMonks |
Re: Altering the inheritance path of an objectby Fletch (Bishop) |
on Sep 27, 2012 at 15:20 UTC ( #996028=note: print w/replies, xml ) | Need Help?? |
If you're wanting to alter the behavior of individual instances then you may be interested in strategy pattern. You'd have different classes implementing the different behaviors and then your original objects would have a reference to (possibly singleton) instances of the corresponding strategy implementors as appropriate.
The cake is a lie.
In Section
Seekers of Perl Wisdom
|
|