1Pod::Readme(3) User Contributed Perl Documentation Pod::Readme(3)
2
3
4
6 Pod::Readme - Convert POD to README file
7
9 use Pod::Readme;
10 my $parser = Pod::Readme->new();
11
12 # Read POD from STDIN and write to STDOUT
13 $parser->parse_from_filehandle;
14
15 # Read POD from Module.pm and write to README
16 $parser->parse_from_file('Module.pm', 'README');
17
19 This module is a subclass of Pod::PlainText which provides additional
20 POD markup for generating README files.
21
22 Why should one bother with this? One can simply use
23
24 pod2text Module.pm > README
25
26 A problem with doing that is that the default pod2text converter will
27 add text to links, so that "L<Module>" is translated to "the Module
28 manpage".
29
30 Another problem is that the README includes the entirety of the module
31 documentation! Most people browsing the README file do not need all of
32 this information.
33
34 Likewise, including installation and requirement information in the
35 module documentation is not necessary either, since the module is
36 already installed.
37
38 This module allows authors to mark portions of the POD to be included
39 only in, or to be excluded from the README file. It also allows you to
40 include portions of another file (such as a separate ChangeLog).
41
42 Markup
43 Special POD markup options are described below:
44
45 begin/end
46 =begin readme
47
48 =head1 README ONLY
49
50 This section will only show up in the README file.
51
52 =end readme
53
54 Delineates a POD section that is only available in README file. If
55 you prefer to include plain text instead, add the "text" modifier:
56
57 =begin readme text
58
59 README ONLY (PLAINTEXT)
60
61 This section will only show up in the README file.
62
63 =end readme
64
65 Note that placing a colon before the section to indicate that it is
66 POD (e.g. "begin :readme") is not supported in this version.
67
68 stop/continue
69 =for readme stop
70
71 All POD that follows will not be included in the README, until a
72 "continue" command occurs:
73
74 =for readme continue
75
76 include
77 =for readme include file=filename type=type start=Regexp stop=Regexp
78
79 =for readme include file=Changes start=^0.09 stop=^0.081 type=text
80
81 Includes a plaintext file named filename, starting with the line
82 that contains the start "Regexp" and ending at the line that begins
83 with the stop "Regexp". (The start and stop Regexps are optional:
84 one or both may be omitted.)
85
86 Type may be "text" or "pod". If omitted, "pod" will be assumed.
87
88 Quotes may be used when the filename or marks contains spaces:
89
90 =for readme include file="another file.pod"
91
92 One can also using maintain multiple file types (such as including
93 TODO, or COPYING) by using a modified constructor:
94
95 $parser = Pod::Readme->new( readme_type => "copying" );
96
97 In the above "Markup" commands replace "readme" with the tag specified
98 instead (such as "copying"):
99
100 =begin copying
101
102 As of version 0.03 you can specify multiple sections by separating them
103 with a comma:
104
105 =begin copying,readme
106
107 There is also no standard list of type names. Some names might be
108 recognized by other POD processors (such as "testing" or "html").
109 Pod::Readme will reject the following "known" type names when they are
110 specified in the constructor:
111
112 testing html xhtml xml docbook rtf man nroff dsr rno latex tex code
113
114 You can also use a "debug" mode to diagnose any problems, such as
115 mistyped format names:
116
117 $parser = Pod::Readme->new( debug => 1 );
118
119 Warnings will be issued for any ignored formatting commands.
120
121 Example
122 For an example, see the Readme.pm file in this distribution.
123
125 See perlpod, perlpodspec and podlators.
126
128 Robert Rothenberg <rrwo at cpan.org>
129
130 Suggestions and Bug Reporting
131 Feedback is always welcome. Please use the CPAN Request Tracker at
132 <http://rt.cpan.org> to submit bug reports.
133
135 Copyright (c) 2005,2006 Robert Rothenberg. All rights reserved. This
136 program is free software; you can redistribute it and/or modify it
137 under the same terms as Perl itself.
138
139 Some portions are based on Pod::PlainText 2.02.
140
141
142
143perl v5.12.0 2010-05-04 Pod::Readme(3)