Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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?
[marto]: Corion Depeche mode were great last night
[Corion]: marto: Whooo! ;) That gives me hope for the large-stadium experience ;)

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2017-03-27 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (319 votes). Check out past polls.