sub excise_arg { my $args = shift; my $arg_name = shift; if (exists $args{$arg_name}) { return delete $args{$arg_name}; } [...]
Shouldn't that be
as you are passing a hashreference into your function?if (exists $args->{$arg_name}) { return delete $args->{$arg_name}; }
Apart from that detail I really like this way :)
-- Hofmator
In reply to Re: Re (tilly) 2: passing subroutine arguments directly into a hash
by Hofmator
in thread passing subroutine arguments directly into a hash
by c
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |