I'm using Moose
, maybe it matters, maybe it doesn't.
My object comes in as $event
, and I save the args
attribute value to a variable:
my $args = $event->args;
That value happens to be a hash, so I do some stuff to the hash, specifically adding a new element:
$$args{id} = 4;
Here's what I don't understand, when I go back to look at my $event
object, it has that new hash element saved inside! I set it to a completely different variable, not the object, so why does the object receive it?