in reply to How does my $self = (@_) actually work?

It isn't unusual to see something like my ($self) = @_;, but I've found that using my $self = shift; is more flexible. After all, if you need this in one function, you need it in every one, so it is easy to cut-and-paste.

That being said, the reason you are able to modify "$self" is because you are not really modifying it. You are modifying the data that it "refers" to. It's a reference, which is really like a pointer. It merely indicates where data is stored, instead of actually storing data. This is why you need to use the arrow operator to "dereference" it and get the goods.

So, if you had code like:
sub X { my $self = shift; $self->{age} = 17; }
Then, as you expect, the 'age' value of your $self-referenced object becomes 17. If you did something like this:
sub X { my $self = shift; print "\$self = $self\n"; $self->{age} = 17; print "\$self = $self\n"; }
You will note that $self does not change in the function, and that in both cases it is clearly a reference to a HASH.

This is something different:
sub Z { my ($foo) = @_; print "\$foo = $foo\n"; $foo = 17; print "\$foo = $foo\n"; } my $bar = 29; print "\$bar = $bar\n"; Z($bar); print "\$bar = $bar\n";
In this case, $bar is not modified, though a copy of it, called $foo, is. Here's an example that uses a reference instead:
sub Z { my ($foo) = @_; print "\$foo = $foo\n"; $$foo = 17; print "\$foo = $foo\n"; } my $bar = 29; print "\$bar = $bar\n"; Z(\$bar); print "\$bar = $bar\n";
On the way into the function, the variable is prefixed with a backslash, meaning "pass by reference". Inside the function, the scalar is "used" with a second $, meaning that you are modifying the value, not the reference. This is another form of dereferencing, not unlike the "arrow operator" used by arrays and hashes.

Any time you see an arrow operator, think of it like a pointer, which it is supposed to represent visually. It points to something which is elsewhere.