$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}}) {
LVL 1
hank1Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ozoConnect With a Mentor Commented:
$self->{_args} = {@_};
0
All Courses

From novice to tech pro — start learning today.