in reply to Perl's warts
This is when you say:
my %parameters = @_;
which allows you to call your subroutine "ideally":
foo( color => 'blue', size => 'really big' );
Apparently the author is not familiar with this idiom, though it's pretty common.
Update
The author does indeed say,
Sure, one could pass a reference to a hash with these key value pairs
But that is not what I've done. I've passed an ordinary list, not a reference to an anonymous hash. That would be:
foo ( {color => 'blue', size => 'really big'} );
which would require the subrountine to say something like:
my %parameters = %{+shift};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl's warts
by grinder (Bishop) on Mar 21, 2001 at 23:19 UTC |