In this script:
role Capturer {
method capturing(::CLASS:D: $ ) {
say "Working with ", $?CLASS, " that holds ", $.gist;
}
}
( <1 2 3 4> but Capturer ).capturing();
A arg-less method is defined, capturing, but if I call it this way, I get:
Too few positionals passed; expected 2 arguments but got 1
in method capturing at captured-class.p6 line 4
in block <unit> at captured-class.p6 line 10
I can fix that giving it a dummy argument
Too few positionals passed; expected 2 arguments but got 1
in method capturing at captured-class.p6 line 4
in block <unit> at captured-class.p6 line 10
Which then returns:
Working with (List+{Capturer}) that holds (1 2 3 4)
Any idea of what kind of argument is waiting for there?