From eb9e59abdee57b7a36f4c2a7501bce8c39a64c9c Mon Sep 17 00:00:00 2001 From: Rafael Schipiura Date: Tue, 29 May 2018 16:41:34 -0300 Subject: [PATCH] Change use of WHAT to ^name It's the recommended way. WHAT is used to actually get a type object, which isn't what we want. We want the name of the class the object was instantiated from. --- doc/Language/js-nutshell.pod6 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Language/js-nutshell.pod6 b/doc/Language/js-nutshell.pod6 index 18f1d9279..1893cd2ae 100644 --- a/doc/Language/js-nutshell.pod6 +++ b/doc/Language/js-nutshell.pod6 @@ -257,15 +257,15 @@ say $str; # def =end code While we are talking about C, the equivalent to C or the -C property on Node.js objects in PerlĀ 6 is the C attribute: +C property on Node.js objects in Perl 6 is the C<^name> meta-attribute: =begin code :lang console.log(typeof 'foo'); // string console.log('foo'.constructor); // String =end code -=begin code :ok-test -say 'foo'.WHAT; # (Str) +=begin code +say 'foo'.^name; # Str =end code =head3 Numeric