Skip to content

Commit 640b659

Browse files
committed
Converting the README to markdown format
1 parent 6ce94d0 commit 640b659

File tree

2 files changed

+100
-98
lines changed

2 files changed

+100
-98
lines changed

README

Lines changed: 0 additions & 98 deletions
This file was deleted.

README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# p6doc -- an attempt to write something like 'perldoc' for Perl 6
2+
3+
An HTML version of this documentation can be found at http://doc.perl6.org/.
4+
5+
With a Rakudo `perl6` executable in `PATH`, try
6+
7+
./bin/p6doc Type::Str
8+
9+
to see the documentation for class `Str`, or
10+
11+
./bin/p6doc Type::Str.split
12+
13+
to see the documentation for method `split` in class `Str`.
14+
15+
--------
16+
17+
## Help Wanted!
18+
19+
Perl 6 is not a small language, and documenting it takes a lot of effort.
20+
Any help is appreciated.
21+
22+
Here are some ways to help us:
23+
24+
* add missing documentation for classes, roles, methods or operators
25+
* add usage examples to existing documentation
26+
* proofread and correct the documentation
27+
28+
The file `WANTED` has a list of particular documents that are known to be
29+
missing.
30+
31+
--------
32+
33+
## Some notes:
34+
35+
**Q:** Why aren't you embedding the docs in the CORE sources?<br>
36+
**A:** Several reasons:
37+
38+
1. This documentation is intended to be universal with
39+
respect to a given version of the specification,
40+
and not necessarily tied to any specific Perl 6
41+
implementation.
42+
2. Implementations' handling of embedded POD is still
43+
a bit uneven; this avoids potential runtime impacts.
44+
3. A separate repo in the perl6 Github account invites
45+
more potential contributors and editors.
46+
47+
**Q:** Should I include methods from superclasses or roles<br>
48+
**A:** No. The HTML version already includes methods from superclasses and
49+
roles, and the `p6doc` script will be taught about those as well.
50+
51+
**Q:** Which license is this stuff under?<br>
52+
**A:** Both code and documentation are available under the Artistic License 2.0
53+
as published by The Perl Foundation. See the `LICENSE` file for the full
54+
text.
55+
56+
--------
57+
58+
## Vision
59+
60+
> I want p6doc and doc.perl6.org to become the No. 1 resource to consult
61+
> when you want to know something about a Perl 6 type or routine (be it
62+
> method, sub or operator). I want it to be useful to every Perl 6 programmer.
63+
>
64+
> -- moritz
65+
66+
--------
67+
68+
## Wishlist stuff:
69+
70+
* Search terms like `.any`, `any()`, `&any`, `::Any`, etc. can be
71+
used to disambiguate whether information is sought on a method,
72+
subroutine, type, etc.
73+
74+
* Searching for `Int.Bool` returns the documentation for the
75+
inherited method `Numeric.Bool`.
76+
77+
* Searching for an operator name returns the documentation for
78+
the operator. (`p6doc '%%'` returns the documentation for
79+
`&infix:<%%>`.)
80+
81+
* Perl6 implementations could embed `P<...>` tags in their source
82+
code that would then inline the corresponding entry from `p6doc`.
83+
This would enable things like `&say.WHY` to (dynamically!)
84+
retrieve the documentation string from `p6doc`, without having
85+
to duplicate the documentation in the `CORE.setting` sources
86+
or to encode the documentation into the binaries.
87+
88+
Example:
89+
90+
# In Rakudo's src/core/IO.pm:
91+
92+
#= P<p6doc/&print>
93+
sub print(|$) { ... }
94+
95+
#= P<p6doc/&say>
96+
sub say(|$) { ... }
97+
98+
#= P<p6doc/&note>
99+
sub note(|$) { ... }
100+

0 commit comments

Comments
 (0)