Skip to content

Commit 4566d99

Browse files
committed
Adds description of .raku for Mu
With its two differences closes #3304
1 parent 69a8aea commit 4566d99

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/Type/Mu.pod6

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,21 @@ ways to write a Raku expression that produces a particular value. Since the
180180
change of name to Raku, this method is deprecated and might disappear in the
181181
near future. Use C<.raku> instead.
182182
183+
=head2 method raku
184+
185+
multi method raku(Mu:U:)
186+
multi method raku(Mu:D:)
187+
188+
For type objects, returns its name if C<.perl> has not been redefined from
189+
Mu, or calls C<.perl> o the name of the type object otherwise.
190+
191+
say Str.raku; # OUTPUT: «Str␤»
192+
193+
For plain objects, it will conventionally return a representation of the object
194+
that can be used via EVAL to reconstruct the value of the object.
195+
196+
say (1..3).Set.raku; # OUTPUT: «Set.new(1,2,3)␤»
197+
183198
=head2 method item
184199
185200
method item(Mu \item:) is raw

0 commit comments

Comments
 (0)