Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-12-19 07:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (73 votes), past polls