Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / man / man3 / Pod::Man.3
CommitLineData
86530b38
AT
1.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1
76. ds #] \fP
77.\}
78.if t \{\
79. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80. ds #V .6m
81. ds #F 0
82. ds #[ \&
83. ds #] \&
84.\}
85. \" simple accents for nroff and troff
86.if n \{\
87. ds ' \&
88. ds ` \&
89. ds ^ \&
90. ds , \&
91. ds ~ ~
92. ds /
93.\}
94.if t \{\
95. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101.\}
102. \" troff and (daisy-wheel) nroff accents
103.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110.ds ae a\h'-(\w'a'u*4/10)'e
111.ds Ae A\h'-(\w'A'u*4/10)'E
112. \" corrections for vroff
113.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115. \" for low resolution devices (crt and lpr)
116.if \n(.H>23 .if \n(.V>19 \
117\{\
118. ds : e
119. ds 8 ss
120. ds o a
121. ds d- d\h'-1'\(ga
122. ds D- D\h'-1'\(hy
123. ds th \o'bp'
124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "Pod::Man 3"
132.TH Pod::Man 3 "2002-06-01" "perl v5.8.0" "Perl Programmers Reference Guide"
133.SH "NAME"
134Pod::Man \- Convert POD data to formatted *roff input
135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS"
137.Vb 2
138\& use Pod::Man;
139\& my $parser = Pod::Man->new (release => $VERSION, section => 8);
140.Ve
141.PP
142.Vb 2
143\& # Read POD from STDIN and write to STDOUT.
144\& $parser->parse_from_filehandle;
145.Ve
146.PP
147.Vb 2
148\& # Read POD from file.pod and write to file.1.
149\& $parser->parse_from_file ('file.pod', 'file.1');
150.Ve
151.SH "DESCRIPTION"
152.IX Header "DESCRIPTION"
153Pod::Man is a module to convert documentation in the \s-1POD\s0 format (the
154preferred language for documenting Perl) into *roff input using the man
155macro set. The resulting *roff code is suitable for display on a terminal
156using \fInroff\fR\|(1), normally via \fIman\fR\|(1), or printing using \fItroff\fR\|(1).
157It is conventionally invoked using the driver script \fBpod2man\fR, but it can
158also be used directly.
159.PP
160As a derived class from Pod::Parser, Pod::Man supports the same methods and
161interfaces. See Pod::Parser for all the details; briefly, one creates a
162new parser with \f(CW\*(C`Pod::Man\->new()\*(C'\fR and then calls either
163\&\fIparse_from_filehandle()\fR or \fIparse_from_file()\fR.
164.PP
165\&\fInew()\fR can take options, in the form of key/value pairs that control the
166behavior of the parser. See below for details.
167.PP
168If no options are given, Pod::Man uses the name of the input file with any
169trailing \f(CW\*(C`.pod\*(C'\fR, \f(CW\*(C`.pm\*(C'\fR, or \f(CW\*(C`.pl\*(C'\fR stripped as the man page title, to
170section 1 unless the file ended in \f(CW\*(C`.pm\*(C'\fR in which case it defaults to
171section 3, to a centered title of \*(L"User Contributed Perl Documentation\*(R", to
172a centered footer of the Perl version it is run with, and to a left-hand
173footer of the modification date of its input (or the current date if given
174\&\s-1STDIN\s0 for input).
175.PP
176Pod::Man assumes that your *roff formatters have a fixed-width font named
177\&\s-1CW\s0. If yours is called something else (like \s-1CR\s0), use the \f(CW\*(C`fixed\*(C'\fR option to
178specify it. This generally only matters for troff output for printing.
179Similarly, you can set the fonts used for bold, italic, and bold italic
180fixed-width output.
181.PP
182Besides the obvious pod conversions, Pod::Man also takes care of formatting
183\&\fIfunc()\fR, \fIfunc\fR\|(3), and simple variable references like \f(CW$foo\fR or \f(CW@bar\fR so you
184don't have to use code escapes for them; complex expressions like
185\&\f(CW$fred{'stuff'}\fR will still need to be escaped, though. It also translates
186dashes that aren't used as hyphens into en dashes, makes long dashes\*(--like
187this\*(--into proper em dashes, fixes \*(L"paired quotes,\*(R" makes \*(C+ look right,
188puts a little space between double underbars, makes \s-1ALLCAPS\s0 a teeny bit
189smaller in \fBtroff\fR, and escapes stuff that *roff treats as special so that
190you don't have to.
191.PP
192The recognized options to \fInew()\fR are as follows. All options take a single
193argument.
194.IP "center" 4
195.IX Item "center"
196Sets the centered page header to use instead of \*(L"User Contributed Perl
197Documentation\*(R".
198.IP "date" 4
199.IX Item "date"
200Sets the left-hand footer. By default, the modification date of the input
201file will be used, or the current date if \fIstat()\fR can't find that file (the
202case if the input is from \s-1STDIN\s0), and the date will be formatted as
203\&\s-1YYYY\-MM\-DD\s0.
204.IP "fixed" 4
205.IX Item "fixed"
206The fixed-width font to use for vertabim text and code. Defaults to \s-1CW\s0.
207Some systems may want \s-1CR\s0 instead. Only matters for \fBtroff\fR output.
208.IP "fixedbold" 4
209.IX Item "fixedbold"
210Bold version of the fixed-width font. Defaults to \s-1CB\s0. Only matters for
211\&\fBtroff\fR output.
212.IP "fixeditalic" 4
213.IX Item "fixeditalic"
214Italic version of the fixed-width font (actually, something of a misnomer,
215since most fixed-width fonts only have an oblique version, not an italic
216version). Defaults to \s-1CI\s0. Only matters for \fBtroff\fR output.
217.IP "fixedbolditalic" 4
218.IX Item "fixedbolditalic"
219Bold italic (probably actually oblique) version of the fixed-width font.
220Pod::Man doesn't assume you have this, and defaults to \s-1CB\s0. Some systems
221(such as Solaris) have this font available as \s-1CX\s0. Only matters for \fBtroff\fR
222output.
223.IP "name" 4
224.IX Item "name"
225Set the name of the manual page. Without this option, the manual name is
226set to the uppercased base name of the file being converted unless the
227manual section is 3, in which case the path is parsed to see if it is a Perl
228module path. If it is, a path like \f(CW\*(C`.../lib/Pod/Man.pm\*(C'\fR is converted into
229a name like \f(CW\*(C`Pod::Man\*(C'\fR. This option, if given, overrides any automatic
230determination of the name.
231.IP "quotes" 4
232.IX Item "quotes"
233Sets the quote marks used to surround C<> text. If the value is a
234single character, it is used as both the left and right quote; if it is two
235characters, the first character is used as the left quote and the second as
236the right quoted; and if it is four characters, the first two are used as
237the left quote and the second two as the right quote.
238.Sp
239This may also be set to the special value \f(CW\*(C`none\*(C'\fR, in which case no quote
240marks are added around C<> text (but the font is still changed for troff
241output).
242.IP "release" 4
243.IX Item "release"
244Set the centered footer. By default, this is the version of Perl you run
245Pod::Man under. Note that some system an macro sets assume that the
246centered footer will be a modification date and will prepend something like
247\&\*(L"Last modified: \*(R"; if this is the case, you may want to set \f(CW\*(C`release\*(C'\fR to
248the last modified date and \f(CW\*(C`date\*(C'\fR to the version number.
249.IP "section" 4
250.IX Item "section"
251Set the section for the \f(CW\*(C`.TH\*(C'\fR macro. The standard section numbering
252convention is to use 1 for user commands, 2 for system calls, 3 for
253functions, 4 for devices, 5 for file formats, 6 for games, 7 for
254miscellaneous information, and 8 for administrator commands. There is a lot
255of variation here, however; some systems (like Solaris) use 4 for file
256formats, 5 for miscellaneous information, and 7 for devices. Still others
257use 1m instead of 8, or some mix of both. About the only section numbers
258that are reliably consistent are 1, 2, and 3.
259.Sp
260By default, section 1 will be used unless the file ends in .pm in which case
261section 3 will be selected.
262.PP
263The standard Pod::Parser method \fIparse_from_filehandle()\fR takes up to two
264arguments, the first being the file handle to read \s-1POD\s0 from and the second
265being the file handle to write the formatted output to. The first defaults
266to \s-1STDIN\s0 if not given, and the second defaults to \s-1STDOUT\s0. The method
267\&\fIparse_from_file()\fR is almost identical, except that its two arguments are the
268input and output disk files instead. See Pod::Parser for the specific
269details.
270.SH "DIAGNOSTICS"
271.IX Header "DIAGNOSTICS"
272.ie n .IP "roff font should be 1 or 2 chars, not ""%s""" 4
273.el .IP "roff font should be 1 or 2 chars, not ``%s''" 4
274.IX Item "roff font should be 1 or 2 chars, not %s"
275(F) You specified a *roff font (using \f(CW\*(C`fixed\*(C'\fR, \f(CW\*(C`fixedbold\*(C'\fR, etc.) that
276wasn't either one or two characters. Pod::Man doesn't support *roff fonts
277longer than two characters, although some *roff extensions do (the canonical
278versions of \fBnroff\fR and \fBtroff\fR don't either).
279.ie n .IP "Invalid link %s" 4
280.el .IP "Invalid link \f(CW%s\fR" 4
281.IX Item "Invalid link %s"
282(W) The \s-1POD\s0 source contained a \f(CW\*(C`L<>\*(C'\fR formatting code that
283Pod::Man was unable to parse. You should never see this error message; it
284probably indicates a bug in Pod::Man.
285.ie n .IP "Invalid quote specification ""%s""" 4
286.el .IP "Invalid quote specification ``%s''" 4
287.IX Item "Invalid quote specification %s"
288(F) The quote specification given (the quotes option to the constructor) was
289invalid. A quote specification must be one, two, or four characters long.
290.ie n .IP "%s:%d: Unknown command paragraph ""%s""." 4
291.el .IP "%s:%d: Unknown command paragraph ``%s''." 4
292.IX Item "%s:%d: Unknown command paragraph %s."
293(W) The \s-1POD\s0 source contained a non-standard command paragraph (something of
294the form \f(CW\*(C`=command args\*(C'\fR) that Pod::Man didn't know about. It was ignored.
295.IP "%s:%d: Unknown escape E<%s>" 4
296.IX Item "%s:%d: Unknown escape E<%s>"
297(W) The \s-1POD\s0 source contained an \f(CW\*(C`E<>\*(C'\fR escape that Pod::Man didn't
298know about. \f(CW\*(C`E<%s>\*(C'\fR was printed verbatim in the output.
299.ie n .IP "%s:%d: Unknown formatting code %s" 4
300.el .IP "%s:%d: Unknown formatting code \f(CW%s\fR" 4
301.IX Item "%s:%d: Unknown formatting code %s"
302(W) The \s-1POD\s0 source contained a non-standard formatting code (something of
303the form \f(CW\*(C`X<>\*(C'\fR) that Pod::Man didn't know about. It was ignored.
304.IP "%s:%d: Unmatched =back" 4
305.IX Item "%s:%d: Unmatched =back"
306(W) Pod::Man encountered a \f(CW\*(C`=back\*(C'\fR command that didn't correspond to an
307\&\f(CW\*(C`=over\*(C'\fR command.
308.SH "BUGS"
309.IX Header "BUGS"
310Eight-bit input data isn't handled at all well at present. The correct
311approach would be to map E<> escapes to the appropriate \s-1UTF\-8\s0
312characters and then do a translation pass on the output according to the
313user-specified output character set. Unfortunately, we can't send eight-bit
314data directly to the output unless the user says this is okay, since some
315vendor *roff implementations can't handle eight-bit data. If the *roff
316implementation can, however, that's far superior to the current hacked
317characters that only work under troff.
318.PP
319There is currently no way to turn off the guesswork that tries to format
320unmarked text appropriately, and sometimes it isn't wanted (particularly
321when using \s-1POD\s0 to document something other than Perl).
322.PP
323The \s-1NAME\s0 section should be recognized specially and index entries emitted
324for everything in that section. This would have to be deferred until the
325next section, since extraneous things in \s-1NAME\s0 tends to confuse various man
326page processors.
327.PP
328Pod::Man doesn't handle font names longer than two characters. Neither do
329most \fBtroff\fR implementations, but \s-1GNU\s0 troff does as an extension. It would
330be nice to support as an option for those who want to use it.
331.PP
332The preamble added to each output file is rather verbose, and most of it is
333only necessary in the presence of E<> escapes for non-ASCII
334characters. It would ideally be nice if all of those definitions were only
335output if needed, perhaps on the fly as the characters are used.
336.PP
337Pod::Man is excessively slow.
338.SH "CAVEATS"
339.IX Header "CAVEATS"
340The handling of hyphens and em dashes is somewhat fragile, and one may get
341the wrong one under some circumstances. This should only matter for
342\&\fBtroff\fR output.
343.PP
344When and whether to use small caps is somewhat tricky, and Pod::Man doesn't
345necessarily get it right.
346.SH "SEE ALSO"
347.IX Header "SEE ALSO"
348Pod::Parser, \fIperlpod\fR\|(1), \fIpod2man\fR\|(1), \fInroff\fR\|(1), \fItroff\fR\|(1),
349\&\fIman\fR\|(1), \fIman\fR\|(7)
350.PP
351Ossanna, Joseph F., and Brian W. Kernighan. \*(L"Troff User's Manual,\*(R"
352Computing Science Technical Report No. 54, \s-1AT&T\s0 Bell Laboratories. This is
353the best documentation of standard \fBnroff\fR and \fBtroff\fR. At the time of
354this writing, it's available at
355<http://www.cs.bell\-labs.com/cm/cs/cstr.html>.
356.PP
357The man page documenting the man macro set may be \fIman\fR\|(5) instead of
358\&\fIman\fR\|(7) on your system. Also, please see \fIpod2man\fR\|(1) for extensive
359documentation on writing manual pages if you've not done it before and
360aren't familiar with the conventions.
361.PP
362The current version of this module is always available from its web site at
363<http://www.eyrie.org/~eagle/software/podlators/>. It is also part of the
364Perl core distribution as of 5.6.0.
365.SH "AUTHOR"
366.IX Header "AUTHOR"
367Russ Allbery <rra@stanford.edu>, based \fIvery\fR heavily on the original
368\&\fBpod2man\fR by Tom Christiansen <tchrist@mox.perl.com>.
369.SH "COPYRIGHT AND LICENSE"
370.IX Header "COPYRIGHT AND LICENSE"
371Copyright 1999, 2000, 2001, 2002 by Russ Allbery <rra@stanford.edu>.
372.PP
373This program is free software; you may redistribute it and/or modify it
374under the same terms as Perl itself.