Raku / book

Using Raku – an unfinished book about Raku
https://perl6book.com/
284 stars 49 forks source link

Using Perl6: .WHAT used without explanation #29

Closed patspam closed 14 years ago

patspam commented 14 years ago

In Section 5 (and 5.2) the following code appears:

multi to-json($d) {
    die "Can't serialize an object of type " ~ $d.WHAT.perl
}

I think it's great to get introduced to .WHAT early on when you're exploring Perl6 for the first time.

The text needs a paragraph / tip mentioning what .WHAT does, and maybe a few others like .perl.

moritz commented 14 years ago

Thanks for the suggestion, I've now added a whole section on introspection, which includes .WHAT and .perl.

patspam commented 14 years ago

Bewdy.