Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

(dws)Re: Re: simple OO constructor

by dws (Chancellor)
on Sep 23, 2001 at 22:07 UTC ( [id://114190]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      sub new {
          my $proto = shift;
          my $self = bless { @_ }, ref($proto) || $proto;
    ...
          my $self = shift;
          ... initialization for the base class ...
      }
    
  2. or download this
      sub initialize {
        my $self = shift;
        # First initialize our inherited aspects
        $self->SUPER::initialize();
        ... initialization specific to the subclass ...
      }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2024-04-19 15:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found