Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: OO: sharing data across inheritance

by cyocum (Curate)
on Jun 02, 2004 at 10:04 UTC ( #359312=note: print w/replies, xml ) Need Help??

in reply to OO: sharing data across inheritance

What I would do is call SUPER::new->() (or whatever the constructor for your base class is) then manipulate the reference that comes out of that and then bless it into the child package. This is just off the top of my head but I would check here perltooc, which is class data in perl faq or here.

  • Comment on Re: OO: sharing data across inheritance

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://359312]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2016-10-25 03:35 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (313 votes). Check out past polls.