Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Altering the inheritance path of an object

by Fletch (Bishop)
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
Domain Nodelet?
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 about the Monastery: (5)
As of 2023-10-04 00:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?