Trey Harris wrote:
>
> 
>   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.

So would this mean zero or more" pairs of named arguments, or one or more:

  sub foo (*%h)

I expected this:

sub foo (*%h)  # one more pairs
sub foo (*%h?) # zero or more pairs

The answer with pugs now is different:

sub foo (*%h) # zero or more pairs
sub foo (%h, *%h), # one or more pairs

If pugs behavior is intended, I think it should be documented in the
spec, as I found unintuitive.

   Mark

Reply via email to