Reading the docs
p6doc - the Perl 6 pod reader
INTRODUCTION
Program p6doc
is a command-line-interface (CLI) program that reads Perl 6 pod from installed modules' source code, in contrast to running perl6 --doc=MODULE programfile
which reads Perl 6 pod from the named source file.
Note that p6doc
may not be installed automatically depending upon how you installed Rakudo Perl 6. To install it use zef
:
zef install p6doc
SYNOPSIS
p6doc [switches] [arguments]
DESCRIPTION
With no switches or arguments, p6doc
lists its help to $*OUT
(stdout
):
You want to maintain the index?To build an index for 'p6doc -f'p6doc buildTo list the index keysp6doc listTo display (s) containing keyp6doc lookupTo show where the index file livesp6doc path-to-indexWhat documentation do you want to read?Examples: p6doc Strp6doc Str.splitp6doc faqp6doc path/to/fileYou can list some top level documents:p6doc -lYou can also look up specific method/routine/sub definitions:p6doc -f hyperp6doc -f Array.pushYou can bypass the pager and print straight to stdout:p6doc -n Str
The text output can be captured and converted to other forms if desired.
If you want to use ANSI escape sequences, which will apply boldface and other enhancements to the output, you will have to set POD_TO_TEXT_ANSI, which is unset by default
export POD_TO_TEXT_ANSI=1
LIMITATIONS
Currently p6doc
can only extract embedded Perl 6 pod from installed module source files (as listed in a distribution's META6.json
file). It is planned to add a feature for p6doc
(in conjunction with META6.json
changes) to extract all Perl 6 pod in files included with the installed distribution.