File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ on what most of the concepts related to parameters mean.
22
22
23
23
=head2 method name
24
24
25
+ Defined as:
26
+
27
+ method name(Parameter:D: --> Str:D)
28
+
25
29
Returns the variable name, which includes
26
30
all L<sigils|/language/variables#Sigils> and
27
31
L<twigils|/language/variables#Twigils>.
@@ -31,7 +35,15 @@ usable by a caller – if it is, it will also appear as an
31
35
L<alias|#method named_names>. Often, the name will be chosen descriptively
32
36
as a form of self-documentation.
33
37
34
- If the parameter is anonymous, C<Nil> will be returned.
38
+ If the parameter is anonymous, an empty string will be returned.
39
+
40
+ B<Note:> Before Rakudo version 2020.08 the return value for an anonymous
41
+ parameter was C<Nil>.
42
+
43
+ =for code
44
+ my Signature $sig = :(Str $x, Bool);
45
+ say $sig.params[0].name; # OUTPUT: «$x»
46
+ say $sig.params[1].name; # OUTPUT: «»
35
47
36
48
=head2 method sigil
37
49
You can’t perform that action at this time.
0 commit comments