Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^5: Inherit from a Role (or something like that)

by John M. Dlugosz (Monsignor)
on May 21, 2011 at 12:41 UTC ( #906064=note: print w/replies, xml ) Need Help??

in reply to Re^4: Inherit from a Role (or something like that)
in thread Inherit from a Role (or something like that)

So that's why you don't want to derive from it ("isa"), but contain one. Use delegation to expose the calls in the same manner that inheritance would. I do agree that passing the parameter in to create the contained object will be more work since something like that is not handled automatically. So far I've avoided that in my current project, but have speculated on passing the whole parameter list given to 'new' in to the builders for the helper objects, so each pulls the parameters it wants.

  • Comment on Re^5: Inherit from a Role (or something like that)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://906064]
[Corion]: Basically, something that decouples the HTTP parsing (+ determining whether to redirect, etc) from the IO
[Corion]: All clients I'm aware of don't do that but issue all IO themselves

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2016-12-07 15:54 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (130 votes). Check out past polls.