No such thing as a small change | |
PerlMonks |
Re: Re: Re: Help me improve this sub with named params!by blokhead (Monsignor) |
on Aug 30, 2003 at 05:36 UTC ( [id://287877]=note: print w/replies, xml ) | Need Help?? |
I thought of doing something similar, but on the off chance that foobar( valid_arg => undef );
would be actually allowed I wrote what I did. Your code wouldn't be able to distinguish that call from a call that omitted the valid_arg parameter. Also, you'd have to add slightly more code to get key,value pairs (instead of just iterating over the values as you are now). But yours probably is nicer if we don't need to worry about undef parameter values.
blokhead
In Section
Seekers of Perl Wisdom
|
|