in reply to multi-arg bless
is improperly refactored asmy $self = bless {}, ref($class) || $class;
when it should bemy $self = bless {}, ref($_[0]) || @_;
my $self = bless {}, ref($_[0]) || $_[0];
I am avoiding the arguments for and against the use of such dual nature constructors.
Be well.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: multi-arg bless
by ysth (Canon) on Jul 13, 2004 at 17:25 UTC |