Subject: | Named arguments can obscure a positional argument called \%args. |
Demonstration:
use v5.14;
use Method::Signatures;
method xxx (\%args, Int :$y) {
$args{x} + $y
}
say __PACKAGE__->xxx( {x => 40}, y => 2 );
Expected output: 42
Actual output: 2
This is caused by the fact that using any named parameters causes Method::Signatures to create a new lexical called %args which it uses to unpack named arguments from; this obscures the positional argument of the same name.
My suggested solution would be to disallow any parameter named \%args.