is such that the third parameter (%args) is never going to be populated. *@args always steals the data that would be caught by *%args.
As a result it always raises an error if you try to call it with a hash parameter, because it uses the list block instead of the named parameter block.
here's a little test routine from in the REPL to prove this.
[253] > sub foo(Bool :$finish, *@args, *%args) { if @args { say "@args";}; if %args { say "%args";}}
&foo
[254] > foo(@list);
@args
[254] > foo(%hash);
@args
[254] > foo(@list, %hash);
@args
on a related note: the docs for this method don't match the signature of the method
The method signature of
execute
is such that the third parameter (
%args
) is never going to be populated.*@args
always steals the data that would be caught by*%args
.As a result it always raises an error if you try to call it with a hash parameter, because it uses the list block instead of the named parameter block.
here's a little test routine from in the REPL to prove this.
on a related note: the docs for this method don't match the signature of the method