Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
more Parameter docs
  • Loading branch information
moritz committed Jul 20, 2012
1 parent af791a4 commit cd5c790
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions lib/Parameter.pod
Expand Up @@ -41,4 +41,45 @@ Returns C<True> for slurpy parameters
Returns C<True> for optional parameters
=head2 parcel
Returns C<True> for parcel parameters
sub f(\$parcel, $non-parcel) { }
=head2 capture
Returns C<True> for parameters that capture the rest of the argument list
sub f(\capture) { }
=head2 rw
Returns C<True> for C<is rw> parameters
=head2 copy
Returns C<True> for C<is copy> parameters
=head2 readonly
Returns C<True> for read-only parameters (the default)
=head2 invocant
Returns C<True> if the parameter is the invocant parameter.
=head2 default
Returns a closure that upon invocation returns the default value for
this paraemter, or C<Any> if no default was provided.
=head2 type_captures
Returns a list of variable names of type captures associated with this
parameter
sub a(::T ::U $x) { }
say &a.signature.params[0].type_captures; # T U
=end pod

0 comments on commit cd5c790

Please sign in to comment.