method capture
Documentation for method capture
assembled from the following types:
class Parameter
From Parameter
(Parameter) method capture
Defined as:
method capture(Parameter: --> Bool)
Returns True
for parameters that capture the rest of the argument list into a single Capture object.
sub how_many_extra_positionals($!, |capture)how_many_extra_positionals(0, 1, 2, 3); # RESULT: «3»say .signature.params[1].capture; # OUTPUT: «True»
Like raw parameters, Capture parameters do not force any context on the values bound to them, which is why their sigils are only used in declarations.