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

Re: Inheriting object data

by coreolyn (Parson)
on Feb 17, 2001 at 03:28 UTC ( [id://59035]=note: print w/replies, xml ) Need Help??


in reply to Inheriting object data

You haven't ..instantiate an object of the subclass (Foo::Bar) I'm not seeing a bless in there anywhere. All you have is a function that has access to Foo's method's . (Which you already have in package main).There is no true OO inheritance or subclass in Foo::Bar.

coreolyn

Replies are listed 'Best First'.
Re (tilly) 2: Inheriting object data
by tilly (Archbishop) on Feb 17, 2001 at 03:37 UTC
    Erm, I think you misread the code. Foo::Bar inherits a perfectly good new() constructor from Foo, and that constructor uses the 2-argument form of bless correctly. Therefore you do indeed have a constructor for Foo::Bar.

      Aw hell... You know we really need another voting catagory ++, --, & doh! Thanks for pointing out da error's of me ways :)

      coreolyn

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (7)
As of 2024-04-17 14:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found