in reply to What does the SHIFT bit do in a constructor
It's done this way to permit inheritance...sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = {}; $self->{NAME} = undef; $self->{AGE} = undef; $self->{PEERS} = []; bless ($self, $class); return $self; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 2: What does the SHIFT bit do in a constructor
by tilly (Archbishop) on May 25, 2001 at 23:20 UTC | |
by tye (Sage) on May 26, 2001 at 00:00 UTC |