@@ -44,28 +44,29 @@ if the parameter is anonymous.
44
44
45
45
This "sigil" is actually an introspection used to help determine
46
46
the normal binding style of a parameter, if it has not been altered
47
- through a L < trait|/type/Signature#Parameter_Traits_and_Modifiers > .
47
+ through a L < trait|/type/Signature#Parameter_traits_and_modifiers > .
48
48
49
49
= begin table
50
- Will bind to Default behavior
51
- = ====================== ================================================================
52
- C < $ > Scalar Generate new Scalar, use instead of Scalar in argument, if any
53
- C < @ > Positional Bind directly to the argument
54
- C < @ > PositionalBindFailover If binding failed, call argument's .cache method, bind to result
55
- C < % > Associative Bind directly to the argument
56
- C < & > Callable Bind directly to the argument
57
- C < | > (anything) Bind to all remaining arguments, make new Capture if needed
58
- C < \ > (anything) Bind directly to the argument, keep existing Scalar, if any
50
+ Sigil | Will bind to | Default behavior
51
+ ===================================================
52
+ $ | Scalar | Generate new Scalar, use instead of Scalar in argument, if any
53
+ @ | Positional | Bind directly to the argument
54
+ @ | PositionalBindFailover | If binding failed, call argument's .cache method, bind to result
55
+ % | Associative | Bind directly to the argument
56
+ & | Callable | Bind directly to the argument
57
+ \ | (anything) | Bind directly to the argument, keep existing Scalar, if any
59
58
= end table
60
59
60
+ Also, C < | > will bind to all remaining arguments, make new C < Capture > if needed.
61
+
61
62
= head2 method type
62
63
63
- Returns the L < nominal type constraint|/type/Signature#Type_Constraints > of
64
+ Returns the L < nominal type constraint|/type/Signature#Type_constraints > of
64
65
the parameter.
65
66
66
67
= head2 method constraints
67
68
68
- Returns L < additional constraints|/type/Signature#Type_Constraints > on the
69
+ Returns L < additional constraints|/type/Signature#Type_constraints > on the
69
70
parameter (usually as an C < all > -Junction).
70
71
71
72
= head2 method named
@@ -74,7 +75,7 @@ Defined as:
74
75
75
76
method named(Parameter:D: --> Bool:D)
76
77
77
- Returns C < True > if it's a L < named parameter|/type/Signature#Positional_vs._Named > .
78
+ Returns C < True > if it's a L < named parameter|/type/Signature#Positional_vs._named_arguments > .
78
79
79
80
my Signature $sig = :(Str $x, Bool :$is-named);
80
81
say $sig.params[0].named; # OUTPUT: «False»
@@ -87,7 +88,7 @@ Defined as:
87
88
method named_names(Parameter:D: --> List:D)
88
89
89
90
Returns the list of externally usable names/aliases for a
90
- L < named parameter|/type/Signature#Positional_vs._Named > .
91
+ L < named parameter|/type/Signature#Positional_vs._named_arguments > .
91
92
92
93
= head2 method positional
93
94
@@ -96,7 +97,7 @@ Defined as:
96
97
method positional(Parameter:D: --> Bool:D)
97
98
98
99
Returns C < True > if the parameter is
99
- L < positional|/type/Signature#Positional_vs._Named > .
100
+ L < positional|/type/Signature#Positional_vs._named_arguments > .
100
101
101
102
my Signature $sig = :(Str $x, Bool :$is-named);
102
103
say $sig.params[0].positional; # OUTPUT: «True»
@@ -109,7 +110,7 @@ Defined as:
109
110
method slurpy(Parameter:D: --> Bool:D)
110
111
111
112
Returns C < True > for
112
- L < slurpy parameters|/type/Signature#Slurpy_(A.K.A._Variadic)_Parameters > .
113
+ L < slurpy parameters|/type/Signature#Slurpy_(A.K.A._variadic)_parameters > .
113
114
114
115
= head2 method twigil
115
116
0 commit comments