Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Altering the inheritance path of an object

by Fletch (Chancellor)
on Sep 27, 2012 at 15:20 UTC ( #996028=note: print w/replies, xml ) Need Help??


in reply to Altering the inheritance path of an object

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.
The cake is a lie.
The cake is a lie.

  • Comment on Re: Altering the inheritance path of an object

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996028]
help
Chatterbox?
[Corion]: They are aware of so many facts, they created systems to abstract them ;)

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2017-05-30 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?