It would be silly to always create a hash from the arguments.
So either create it yourself (local %_ = @_; or alias local %_ = @_;) when it's acceptable, or create an attribute you can specify on a sub which does it for you (e.g. sub foo :named_args { ... }).
In reply to Re: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?
by ikegami
in thread Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?
by smls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |