Skip to content

Commit 8b0b7f1

Browse files
authored
Mention the new .raku method
1 parent ab9df5b commit 8b0b7f1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

doc/Language/faq.pod6

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,9 @@ X<|Data::Dumper (FAQ)>
308308
Typical options are to use the L<say|/routine/say> routine that uses
309309
the L<gist|/routine/gist> method which gives the "gist" of the object being
310310
dumped. More detailed output can be obtained by calling the
311-
L<perl|/routine/perl> method that typically returns an object's representation
312-
in L<EVAL|/routine/EVAL>-able code.
311+
L<perl|/routine/perl> method (soon to be deprecated in favor of C<$obj.raku>,
312+
available since the Rakudo 2019.11 release) that typically returns an object's
313+
representation in L<EVAL|/routine/EVAL>-able code.
313314
314315
If you're using the L<rakudo|https://rakudo.org> implementation, you can use
315316
the L«rakudo-specific C<dd> routine|/programs/01-debugging#Dumper_function_dd»
@@ -677,8 +678,8 @@ about the object deemed unimportant to understanding the essence of the object.
677678
678679
Or phrased differently, C<$obj.Str> gives a string representation,
679680
C<$obj.gist> provides a short summary of that object suitable for
680-
fast recognition by a human, and C<$obj.perl> gives a Rakuish representation
681-
from which the object could be re-created.
681+
fast recognition by a human, and C<$obj.perl> (C<$obj.raku>) gives a Rakuish
682+
representation from which the object could be re-created.
682683
683684
For example, when the C<Str> method is invoked on a type object, also known
684685
as an "undefined value", the type is stringified to an empty string
@@ -694,8 +695,8 @@ say $x; # OUTPUT: «(Date)␤»
694695
695696
If you'd like to show a debugging version of an object, it is probably better
696697
to use the L«rakudo-specific C<dd> routine|/programs/01-debugging#Dumper_function_dd».
697-
It essentially does a C<$obj.perl> and shows that on STDERR rather than STDOUT,
698-
so it won't interfere with any "normal" output of your program.
698+
It essentially does a C<$obj.perl> (C<$obj.raku>) and shows that on STDERR rather than
699+
STDOUT, so it won't interfere with any "normal" output of your program.
699700
700701
In short, C<say> is optimized for casual human interpretation, C<dd> is optimized
701702
for casual debugging output and C<print> and C<put> are more generally suitable

0 commit comments

Comments
 (0)