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.
In reply to Re: multi-arg bless
by rir
in thread multi-arg bless
by ysth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |