CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
About classes and their parents

 



trysil
Novice

May 30, 2011, 5:36 AM

Post #1 of 2 (661 views)
About classes and their parents Can't Post

Hi!
Taking a look at OO perl and now I'm wondering about a good way to call the constructor of the parent class.

e.g I have a superclass A and a class B that inherits from A.
As I call the sub new in the B class I want to start by calling the sub new in the parent class with part of the arguments sent to B.

Can't get it to work in my test code.

/T


rovf
Veteran

May 30, 2011, 6:58 AM

Post #2 of 2 (655 views)
Re: [trysil] About classes and their parents [In reply to] Can't Post

SUPER::new

See perldoc perlobj

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives