Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Inheritance: parent class determine which child class to use?

by fbicknel (Beadle)
on Jul 30, 2012 at 19:54 UTC ( #984503=note: print w/replies, xml ) Need Help??


in reply to Re: Inheritance: parent class determine which child class to use?
in thread Inheritance: parent class determine which child class to use?

I do appreciate your reply. You said Car->new, then had a means of figuring out it was a BMW, so I'll take that as a + vote (not literally, of course).

Got your caution about circular dependancies. This seems at least to be a limited breach of said contract. Just call Car->new once, then forevermore know that the returned object is typed according to your specifications. No harm in that? <grin>

  • Comment on Re: Inheritance: parent class determine which child class to use?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://984503]
help
Chatterbox?
[sphinx9]: how do i ask a question?

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2017-10-19 06:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (251 votes). Check out past polls.

    Notices?