Current Path : /usr/opt/perl530/man/man1/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/opt/perl530/man/man1/perlpodstyle.1 |
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "PERLPODSTYLE 1" .TH PERLPODSTYLE 1 "2019-10-24" "perl v5.30.2" "Perl Programmers Reference Guide" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" perlpodstyle \- Perl POD style guide .SH "DESCRIPTION" .IX Header "DESCRIPTION" These are general guidelines for how to write \s-1POD\s0 documentation for Perl scripts and modules, based on general guidelines for writing good \s-1UNIX\s0 man pages. All of these guidelines are, of course, optional, but following them will make your documentation more consistent with other documentation on the system. .PP The name of the program being documented is conventionally written in bold (using B<>) wherever it occurs, as are all program options. Arguments should be written in italics (I<>). Function names are traditionally written in italics; if you write a function as \fBfunction()\fR, Pod::Man will take care of this for you. Literal code or commands should be in C<>. References to other man pages should be in the form \&\f(CW\*(C`manpage(section)\*(C'\fR or \f(CW\*(C`L<manpage(section)>\*(C'\fR, and Pod::Man will automatically format those appropriately. The second form, with L<>, is used to request that a \s-1POD\s0 formatter make a link to the man page if possible. As an exception, one normally omits the section when referring to module documentation since it's not clear what section module documentation will be in; use \f(CW\*(C`L<Module::Name>\*(C'\fR for module references instead. .PP References to other programs or functions are normally in the form of man page references so that cross-referencing tools can provide the user with links and the like. It's possible to overdo this, though, so be careful not to clutter your documentation with too much markup. References to other programs that are not given as man page references should be enclosed in B<>. .PP The major headers should be set out using a \f(CW\*(C`=head1\*(C'\fR directive, and are historically written in the rather startling \s-1ALL UPPER CASE\s0 format; this is not mandatory, but it's strongly recommended so that sections have consistent naming across different software packages. Minor headers may be included using \f(CW\*(C`=head2\*(C'\fR, and are typically in mixed case. .PP The standard sections of a manual page are: .IP "\s-1NAME\s0" 4 .IX Item "NAME" Mandatory section; should be a comma-separated list of programs or functions documented by this \s-1POD\s0 page, such as: .Sp .Vb 1 \& foo, bar \- programs to do something .Ve .Sp Manual page indexers are often extremely picky about the format of this section, so don't put anything in it except this line. Every program or function documented by this \s-1POD\s0 page should be listed, separated by a comma and a space. For a Perl module, just give the module name. A single dash, and only a single dash, should separate the list of programs or functions from the description. Do not use any markup such as C<> or B<> anywhere in this line. Functions should not be qualified with \f(CW\*(C`()\*(C'\fR or the like. The description should ideally fit on a single line, even if a man program replaces the dash with a few tabs. .IP "\s-1SYNOPSIS\s0" 4 .IX Item "SYNOPSIS" A short usage summary for programs and functions. This section is mandatory for section 3 pages. For Perl module documentation, it's usually convenient to have the contents of this section be a verbatim block showing some (brief) examples of typical ways the module is used. .IP "\s-1DESCRIPTION\s0" 4 .IX Item "DESCRIPTION" Extended description and discussion of the program or functions, or the body of the documentation for man pages that document something else. If particularly long, it's a good idea to break this up into subsections \&\f(CW\*(C`=head2\*(C'\fR directives like: .Sp .Vb 1 \& =head2 Normal Usage \& \& =head2 Advanced Features \& \& =head2 Writing Configuration Files .Ve .Sp or whatever is appropriate for your documentation. .Sp For a module, this is generally where the documentation of the interfaces provided by the module goes, usually in the form of a list with an \&\f(CW\*(C`=item\*(C'\fR for each interface. Depending on how many interfaces there are, you may want to put that documentation in separate \s-1METHODS, FUNCTIONS, CLASS METHODS,\s0 or \s-1INSTANCE METHODS\s0 sections instead and save the \&\s-1DESCRIPTION\s0 section for an overview. .IP "\s-1OPTIONS\s0" 4 .IX Item "OPTIONS" Detailed description of each of the command-line options taken by the program. This should be separate from the description for the use of parsers like Pod::Usage. This is normally presented as a list, with each option as a separate \f(CW\*(C`=item\*(C'\fR. The specific option string should be enclosed in B<>. Any values that the option takes should be enclosed in I<>. For example, the section for the option \&\fB\-\-section\fR=\fImanext\fR would be introduced with: .Sp .Vb 1 \& =item B<\-\-section>=I<manext> .Ve .Sp Synonymous options (like both the short and long forms) are separated by a comma and a space on the same \f(CW\*(C`=item\*(C'\fR line, or optionally listed as their own item with a reference to the canonical name. For example, since \&\fB\-\-section\fR can also be written as \fB\-s\fR, the above would be: .Sp .Vb 1 \& =item B<\-s> I<manext>, B<\-\-section>=I<manext> .Ve .Sp Writing the short option first is recommended because it's easier to read. The long option is long enough to draw the eye to it anyway and the short option can otherwise get lost in visual noise. .IP "\s-1RETURN VALUE\s0" 4 .IX Item "RETURN VALUE" What the program or function returns, if successful. This section can be omitted for programs whose precise exit codes aren't important, provided they return 0 on success and non-zero on failure as is standard. It should always be present for functions. For modules, it may be useful to summarize return values from the module interface here, or it may be more useful to discuss return values separately in the documentation of each function or method the module provides. .IP "\s-1ERRORS\s0" 4 .IX Item "ERRORS" Exceptions, error return codes, exit statuses, and errno settings. Typically used for function or module documentation; program documentation uses \s-1DIAGNOSTICS\s0 instead. The general rule of thumb is that errors printed to \f(CW\*(C`STDOUT\*(C'\fR or \f(CW\*(C`STDERR\*(C'\fR and intended for the end user are documented in \s-1DIAGNOSTICS\s0 while errors passed internal to the calling program and intended for other programmers are documented in \s-1ERRORS.\s0 When documenting a function that sets errno, a full list of the possible errno values should be given here. .IP "\s-1DIAGNOSTICS\s0" 4 .IX Item "DIAGNOSTICS" All possible messages the program can print out and what they mean. You may wish to follow the same documentation style as the Perl documentation; see \fBperldiag\fR\|(1) for more details (and look at the \s-1POD\s0 source as well). .Sp If applicable, please include details on what the user should do to correct the error; documenting an error as indicating \*(L"the input buffer is too small\*(R" without telling the user how to increase the size of the input buffer (or at least telling them that it isn't possible) aren't very useful. .IP "\s-1EXAMPLES\s0" 4 .IX Item "EXAMPLES" Give some example uses of the program or function. Don't skimp; users often find this the most useful part of the documentation. The examples are generally given as verbatim paragraphs. .Sp Don't just present an example without explaining what it does. Adding a short paragraph saying what the example will do can increase the value of the example immensely. .IP "\s-1ENVIRONMENT\s0" 4 .IX Item "ENVIRONMENT" Environment variables that the program cares about, normally presented as a list using \f(CW\*(C`=over\*(C'\fR, \f(CW\*(C`=item\*(C'\fR, and \f(CW\*(C`=back\*(C'\fR. For example: .Sp .Vb 1 \& =over 6 \& \& =item HOME \& \& Used to determine the user\*(Aqs home directory. F<.foorc> in this \& directory is read for configuration details, if it exists. \& \& =back .Ve .Sp Since environment variables are normally in all uppercase, no additional special formatting is generally needed; they're glaring enough as it is. .IP "\s-1FILES\s0" 4 .IX Item "FILES" All files used by the program or function, normally presented as a list, and what it uses them for. File names should be enclosed in F<>. It's particularly important to document files that will be potentially modified. .IP "\s-1CAVEATS\s0" 4 .IX Item "CAVEATS" Things to take special care with, sometimes called \s-1WARNINGS.\s0 .IP "\s-1BUGS\s0" 4 .IX Item "BUGS" Things that are broken or just don't work quite right. .IP "\s-1RESTRICTIONS\s0" 4 .IX Item "RESTRICTIONS" Bugs you don't plan to fix. :\-) .IP "\s-1NOTES\s0" 4 .IX Item "NOTES" Miscellaneous commentary. .IP "\s-1AUTHOR\s0" 4 .IX Item "AUTHOR" Who wrote it (use \s-1AUTHORS\s0 for multiple people). It's a good idea to include your current e\-mail address (or some e\-mail address to which bug reports should be sent) or some other contact information so that users have a way of contacting you. Remember that program documentation tends to roam the wild for far longer than you expect and pick a contact method that's likely to last. .IP "\s-1HISTORY\s0" 4 .IX Item "HISTORY" Programs derived from other sources sometimes have this. Some people keep a modification log here, but that usually gets long and is normally better maintained in a separate file. .IP "\s-1COPYRIGHT AND LICENSE\s0" 4 .IX Item "COPYRIGHT AND LICENSE" For copyright .Sp .Vb 1 \& Copyright YEAR(s) YOUR NAME(s) .Ve .Sp (No, (C) is not needed. No, \*(L"all rights reserved\*(R" is not needed.) .Sp For licensing the easiest way is to use the same licensing as Perl itself: .Sp .Vb 2 \& This library is free software; you may redistribute it and/or \& modify it under the same terms as Perl itself. .Ve .Sp This makes it easy for people to use your module with Perl. Note that this licensing example is neither an endorsement or a requirement, you are of course free to choose any licensing. .IP "\s-1SEE ALSO\s0" 4 .IX Item "SEE ALSO" Other man pages to check out, like \fBman\fR\|(1), \fBman\fR\|(7), \fBmakewhatis\fR\|(8), or \&\fBcatman\fR\|(8). Normally a simple list of man pages separated by commas, or a paragraph giving the name of a reference work. Man page references, if they use the standard \f(CW\*(C`name(section)\*(C'\fR form, don't have to be enclosed in L<> (although it's recommended), but other things in this section probably should be when appropriate. .Sp If the package has a mailing list, include a \s-1URL\s0 or subscription instructions here. .Sp If the package has a web site, include a \s-1URL\s0 here. .PP Documentation of object-oriented libraries or modules may want to use \&\s-1CONSTRUCTORS\s0 and \s-1METHODS\s0 sections, or \s-1CLASS METHODS\s0 and \s-1INSTANCE METHODS\s0 sections, for detailed documentation of the parts of the library and save the \s-1DESCRIPTION\s0 section for an overview. Large modules with a function interface may want to use \s-1FUNCTIONS\s0 for similar reasons. Some people use \&\s-1OVERVIEW\s0 to summarize the description if it's quite long. .PP Section ordering varies, although \s-1NAME\s0 must always be the first section (you'll break some man page systems otherwise), and \s-1NAME, SYNOPSIS, DESCRIPTION,\s0 and \s-1OPTIONS\s0 generally always occur first and in that order if present. In general, \s-1SEE ALSO, AUTHOR,\s0 and similar material should be left for last. Some systems also move \s-1WARNINGS\s0 and \s-1NOTES\s0 to last. The order given above should be reasonable for most purposes. .PP Some systems use \s-1CONFORMING TO\s0 to note conformance to relevant standards and MT-LEVEL to note safeness for use in threaded programs or signal handlers. These headings are primarily useful when documenting parts of a C library. .PP Finally, as a general note, try not to use an excessive amount of markup. As documented here and in Pod::Man, you can safely leave Perl variables, function names, man page references, and the like unadorned by markup and the \s-1POD\s0 translators will figure it out for you. This makes it much easier to later edit the documentation. Note that many existing translators will do the wrong thing with e\-mail addresses when wrapped in L<>, so don't do that. .SH "AUTHOR" .IX Header "AUTHOR" Russ Allbery <rra@cpan.org>, with large portions of this documentation taken from the documentation of the original \fBpod2man\fR implementation by Larry Wall and Tom Christiansen. .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright 1999, 2000, 2001, 2004, 2006, 2008, 2010, 2015, 2018 Russ Allbery <rra@cpan.org> .PP Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. .PP SPDX-License-Identifier: \s-1FSFAP\s0 .SH "SEE ALSO" .IX Header "SEE ALSO" For additional information that may be more accurate for your specific system, see either \fBman\fR\|(5) or \fBman\fR\|(7) depending on your system manual section numbering conventions. .PP This documentation is maintained as part of the podlators distribution. The current version is always available from its web site at <https://www.eyrie.org/~eagle/software/podlators/>.