1POD2TEXT(1)           User Contributed Perl Documentation          POD2TEXT(1)
2
3
4

NAME

6       pod2text - Convert POD data to formatted ASCII text
7

SYNOPSIS

9       pod2text [-aclostu] [--code] [--errors=style] [-i indent]
10           [-q quotes] [--nourls] [--stderr] [-w width]
11           [input [output ...]]
12
13       pod2text -h
14

DESCRIPTION

16       pod2text is a front-end for Pod::Text and its subclasses.  It uses them
17       to generate formatted ASCII text from POD source.  It can optionally
18       use either termcap sequences or ANSI color escape sequences to format
19       the text.
20
21       input is the file to read for POD source (the POD can be embedded in
22       code).  If input isn't given, it defaults to "STDIN".  output, if
23       given, is the file to which to write the formatted output.  If output
24       isn't given, the formatted output is written to "STDOUT".  Several POD
25       files can be processed in the same pod2text invocation (saving module
26       load and compile times) by providing multiple pairs of input and output
27       files on the command line.
28

OPTIONS

30       -a, --alt
31           Use an alternate output format that, among other things, uses a
32           different heading style and marks "=item" entries with a colon in
33           the left margin.
34
35       --code
36           Include any non-POD text from the input file in the output as well.
37           Useful for viewing code documented with POD blocks with the POD
38           rendered and the code left intact.
39
40       -c, --color
41           Format the output with ANSI color escape sequences.  Using this
42           option requires that Term::ANSIColor be installed on your system.
43
44       -i indent, --indent=indent
45           Set the number of spaces to indent regular text, and the default
46           indentation for "=over" blocks.  Defaults to 4 spaces if this
47           option isn't given.
48
49       -errors=style
50           Set the error handling style.  "die" says to throw an exception on
51           any POD formatting error.  "stderr" says to report errors on
52           standard error, but not to throw an exception.  "pod" says to
53           include a POD ERRORS section in the resulting documentation
54           summarizing the errors.  "none" ignores POD errors entirely, as
55           much as possible.
56
57           The default is "die".
58
59       -h, --help
60           Print out usage information and exit.
61
62       -l, --loose
63           Print a blank line after a "=head1" heading.  Normally, no blank
64           line is printed after "=head1", although one is still printed after
65           "=head2", because this is the expected formatting for manual pages;
66           if you're formatting arbitrary text documents, using this option is
67           recommended.
68
69       -m width, --left-margin=width, --margin=width
70           The width of the left margin in spaces.  Defaults to 0.  This is
71           the margin for all text, including headings, not the amount by
72           which regular text is indented; for the latter, see -i option.
73
74       --nourls
75           Normally, L<> formatting codes with a URL but anchor text are
76           formatted to show both the anchor text and the URL.  In other
77           words:
78
79               L<foo|http://example.com/>
80
81           is formatted as:
82
83               foo <http://example.com/>
84
85           This flag, if given, suppresses the URL when anchor text is given,
86           so this example would be formatted as just "foo".  This can produce
87           less cluttered output in cases where the URLs are not particularly
88           important.
89
90       -o, --overstrike
91           Format the output with overstrike printing.  Bold text is rendered
92           as character, backspace, character.  Italics and file names are
93           rendered as underscore, backspace, character.  Many pagers, such as
94           less, know how to convert this to bold or underlined text.
95
96       -q quotes, --quotes=quotes
97           Sets the quote marks used to surround C<> text to quotes.  If
98           quotes is a single character, it is used as both the left and right
99           quote; if quotes is two characters, the first character is used as
100           the left quote and the second as the right quoted; and if quotes is
101           four characters, the first two are used as the left quote and the
102           second two as the right quote.
103
104           quotes may also be set to the special value "none", in which case
105           no quote marks are added around C<> text.
106
107       -s, --sentence
108           Assume each sentence ends with two spaces and try to preserve that
109           spacing.  Without this option, all consecutive whitespace in non-
110           verbatim paragraphs is compressed into a single space.
111
112       --stderr
113           By default, pod2text dies if any errors are detected in the POD
114           input.  If --stderr is given and no --errors flag is present,
115           errors are sent to standard error, but pod2text does not abort.
116           This is equivalent to "--errors=stderr" and is supported for
117           backward compatibility.
118
119       -t, --termcap
120           Try to determine the width of the screen and the bold and underline
121           sequences for the terminal from termcap, and use that information
122           in formatting the output.  Output will be wrapped at two columns
123           less than the width of your terminal device.  Using this option
124           requires that your system have a termcap file somewhere where
125           Term::Cap can find it and requires that your system support
126           termios.  With this option, the output of pod2text will contain
127           terminal control sequences for your current terminal type.
128
129       -u, --utf8
130           By default, pod2text tries to use the same output encoding as its
131           input encoding (to be backward-compatible with older versions).
132           This option says to instead force the output encoding to UTF-8.
133
134           Be aware that, when using this option, the input encoding of your
135           POD source must be properly declared unless it is US-ASCII or
136           Latin-1.  POD input without an "=encoding" command will be assumed
137           to be in Latin-1, and if it's actually in UTF-8, the output will be
138           double-encoded.  See perlpod(1) for more information on the
139           "=encoding" command.
140
141       -w, --width=width, -width
142           The column at which to wrap text on the right-hand side.  Defaults
143           to 76, unless -t is given, in which case it's two columns less than
144           the width of your terminal device.
145

EXIT STATUS

147       As long as all documents processed result in some output, even if that
148       output includes errata (a "POD ERRORS" section generated with
149       "--errors=pod"), pod2text will exit with status 0.  If any of the
150       documents being processed do not result in an output document, pod2text
151       will exit with status 1.  If there are syntax errors in a POD document
152       being processed and the error handling style is set to the default of
153       "die", pod2text will abort immediately with exit status 255.
154

DIAGNOSTICS

156       If pod2text fails with errors, see Pod::Text and Pod::Simple for
157       information about what those errors might mean.  Internally, it can
158       also produce the following diagnostics:
159
160       -c (--color) requires Term::ANSIColor be installed
161           (F) -c or --color were given, but Term::ANSIColor could not be
162           loaded.
163
164       Unknown option: %s
165           (F) An unknown command line option was given.
166
167       In addition, other Getopt::Long error messages may result from invalid
168       command-line options.
169

ENVIRONMENT

171       COLUMNS
172           If -t is given, pod2text will take the current width of your screen
173           from this environment variable, if available.  It overrides
174           terminal width information in TERMCAP.
175
176       TERMCAP
177           If -t is given, pod2text will use the contents of this environment
178           variable if available to determine the correct formatting sequences
179           for your current terminal device.
180

SEE ALSO

182       Pod::Text, Pod::Text::Color, Pod::Text::Overstrike, Pod::Text::Termcap,
183       Pod::Simple, perlpod(1)
184
185       The current version of this script is always available from its web
186       site at <http://www.eyrie.org/~eagle/software/podlators/>.  It is also
187       part of the Perl core distribution as of 5.6.0.
188

AUTHOR

190       Russ Allbery <rra@stanford.edu>.
191
193       Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2012, 2013 Russ
194       Allbery <rra@stanford.edu>.
195
196       This program is free software; you may redistribute it and/or modify it
197       under the same terms as Perl itself.
198
199
200
201perl v5.16.3                      2013-01-02                       POD2TEXT(1)
Impressum