Skip to content

Commit 4edfeda

Browse files
committed
Correct and expand on Paramter.capture
1 parent db0354a commit 4edfeda

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/Type/Parameter.pod

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,17 @@ L<rw|#rw>-parameter which can only bind to variables, never to values.
7070
7171
=head2 method capture
7272
73-
Returns C<True> for parameters that capture the rest of the argument list.
73+
Returns C<True> for parameters that capture the rest of the argument list into
74+
a single object of L<type Capture|/type/Capture>.
7475
75-
sub f(\capture) { }
76+
sub f(|capture) { }
77+
say &f.signature.params[0].capture; # True
7678
7779
Capture parameters do not force any context on the values passed bound
7880
to them, which is why they cannot have sigils.
7981
82+
83+
8084
=head2 method rw
8185
8286
Returns C<True> for C<is rw> parameters.

0 commit comments

Comments
 (0)