In a message dated Tue, 29 Aug 2006, Mark Stosberg writes:


Regarding The S06 description of named arguments:
http://feather.perl6.nl/syn/S06.html#Named_arguments

What I find missing here is documentation of the signature to use
if you want to declare "I accept an arbitrary number of named
arguments". (Like the param() methods common in Perl5 do).

Maybe it's the slurpy hash?

sub foo (*%h) {...} ?

The spec could use some clarification on this point.

I think it's already there:

  Slurpy parameters follow any required or optional parameters. They are
  marked by a C<*> before the parameter:

      sub duplicate($n, *%flag, [EMAIL PROTECTED]) {...}

  Named arguments are bound to the slurpy hash (C<*%flag>
  in the above example). Such arguments are evaluated in scalar context.
  Any remaining variadic arguments at the end of the argument list
  are bound to the slurpy array (C<[EMAIL PROTECTED]> above) and are evaluated
  in list context.

Trey

Reply via email to