Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

(dws)Re: Re: simple OO constructor

by dws (Chancellor)
on Sep 23, 2001 at 22:07 UTC ( #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
Node Status?
node history
Node Type: note [id://114190]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2015-07-08 07:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (96 votes), past polls