Skip to content

Commit b140908

Browse files
committed
PR for new program p6doc info is ready
1 parent b5be80c commit b140908

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

doc/Programs/02-reading-docs.pod6

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
=begin pod
2+
3+
=TITLE Reading the docs
4+
5+
=SUBTITLE p6doc - the Perl 6 pod reader
6+
7+
Program C<p6doc> is a comman-line-interface (CLI) program to read
8+
Perl 6 pod from B<installed> modules' source code, in contrast to
9+
running C<perl6 --doc=MODULE programfile> which reads Perl 6 pod from
10+
the named source file.
11+
12+
Note that C<p6doc> may not be installed automatically depending upon
13+
how you installed Rakudo Perl 6. To install it use C<zef>:
14+
15+
=for code :lang<usage>
16+
zef install p6doc
17+
18+
=head1 SYNOPSIS
19+
20+
=for code :lang<usage>
21+
p6doc [switches] [arguments]
22+
23+
=head1 DESCRIPTION
24+
25+
With no switches or arguments, C<p6doc> lists its help to C<$*OUT> (stdout):
26+
27+
=begin code :skip-test
28+
You want to maintain the index?
29+
To build an index for 'p6doc -f'
30+
p6doc build
31+
32+
To list the index keys
33+
p6doc list
34+
35+
To display module name(s) containing key
36+
p6doc lookup
37+
38+
To show where the index file lives
39+
p6doc path-to-index
40+
41+
What documentation do you want to read?
42+
Examples: p6doc Str
43+
p6doc Str.split
44+
p6doc faq
45+
p6doc path/to/file
46+
47+
You can list some top level documents:
48+
p6doc -l
49+
50+
You can also look up specific method/routine/sub definitions:
51+
p6doc -f hyper
52+
p6doc -f Array.push
53+
54+
You can bypass the pager and print straight to stdout:
55+
p6doc -n Str
56+
=end code
57+
58+
The text output can be captured and converted to other forms if desired.
59+
60+
=head1 LIMITATIONS
61+
62+
Currently C<p6doc> can only extract embedded Perl 6 pod from installed
63+
module source files (as listed in a distribution's C<META6.json>
64+
file). It is planned to add a feature for C<p6doc> (in conjunction
65+
with C<META6.json> changes) to extract B<all> Perl 6 pod in files
66+
included with the installed distribution.
67+
68+
=end pod

0 commit comments

Comments
 (0)