Subject: | slurpy parameters don't work with Type::Params::compile_named |
Adding slurpy to compile_named throws this error:
Expected parameter name as string, got HASH(0x5584694d6428)
I think I am using it as specified in the documentation:
test_slurpy(message => "hello!", 123);
sub test_slurpy {
state $check = compile_named(
{named_to_list => 1},
message => Str,
slurpy ArrayRef,
);
my ($message, @slurped) = $check->(@_);
say "$message";
}