hank1
asked on
$self = {@_}, but not $self->{_args}->{@_}
Why doesn't this work both ways
$o = Obj->new(param1 => "nuts", param2 => "bolts")
Works great.
sub new
$class = shift;
$self = {@_};
foreach $k (keys %$self) {
Fails to load anything I can see
sub new
$class = shift;
$self = {};
$self->{_args}->{@_};
foreach $k (keys %{$self->{_args}}) {
$o = Obj->new(param1 => "nuts", param2 => "bolts")
Works great.
sub new
$class = shift;
$self = {@_};
foreach $k (keys %$self) {
Fails to load anything I can see
sub new
$class = shift;
$self = {};
$self->{_args}->{@_};
foreach $k (keys %{$self->{_args}}) {
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.