Perl 6 Perl 6 Documentation - The good, the bad, and the missing #33

.WHY

Perl 6 has a .WHY metamethod that returns the documentation for an object.

$ cat xyz.p6

#= The C<xyz> function does something useful.
sub xyz() { say 'hello world'; }

say &xyz.WHY;

$ perl6 xyz.p6
The C<xyz> function does something useful.
Copyright © 2012
http://www.pmichaud.com/2012/pres/