Taulmarill has asked for the wisdom of the Perl Monks concerning the following question:
sub new{ my $self = shift; my $foo = shift; $self->{'foo'} = $foo; return bless( {}, ( ref($self) || $self ) ); }
$self = bless( {}, ( ref($self) || $self ) ); $self->{'foo'} = $foo; return $self;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: $self->{foo} in sub new {}
by broquaint (Abbot) on Dec 22, 2003 at 13:27 UTC | |
by Roy Johnson (Monsignor) on Dec 22, 2003 at 20:40 UTC | |
by merlyn (Sage) on Dec 22, 2003 at 21:10 UTC | |
by flounder99 (Friar) on Dec 22, 2003 at 14:50 UTC | |
by merlyn (Sage) on Dec 22, 2003 at 15:07 UTC | |
by flounder99 (Friar) on Dec 22, 2003 at 15:23 UTC | |
by Taulmarill (Deacon) on Dec 22, 2003 at 15:46 UTC | |
by hardburn (Abbot) on Dec 22, 2003 at 18:00 UTC | |
by grinder (Bishop) on Dec 22, 2003 at 15:16 UTC | |
|
Re: $self->{foo} in sub new {}
by drieux (Initiate) on Dec 22, 2003 at 20:47 UTC |