1PERLDOC(1)             Perl Programmers Reference Guide             PERLDOC(1)
2
3
4

NAME

6       perldoc - Look up Perl documentation in Pod format.
7

SYNOPSIS

9       perldoc [-h] [-v] [-t] [-u] [-m] [-l] [-F] [-i] [-V] [-T] [-r] [-ddes‐
10       tination_file] [-oformatname] [-MFormatterClassName] [-wformatterop‐
11       tion:value] [-nnroff-replacement] [-X] PageName⎪ModuleName⎪ProgramName
12
13       perldoc -f BuiltinFunction
14
15       perldoc -q FAQ Keyword
16
17       See below for more description of the switches.
18

DESCRIPTION

20       perldoc looks up a piece of documentation in .pod format that is embed‐
21       ded in the perl installation tree or in a perl script, and displays it
22       via "pod2man ⎪ nroff -man ⎪ $PAGER". (In addition, if running under
23       HP-UX, "col -x" will be used.) This is primarily used for the documen‐
24       tation for the perl library modules.
25
26       Your system may also have man pages installed for those modules, in
27       which case you can probably just use the man(1) command.
28
29       If you are looking for a table of contents to the Perl library modules
30       documentation, see the perltoc page.
31

OPTIONS

33       -h   Prints out a brief help message.
34
35       -v   Describes search for the item in detail (verbosely).
36
37       -t   Display docs using plain text converter, instead of nroff. This
38            may be faster, but it probably won't look as nice.
39
40       -u   Skip the real Pod formatting, and just show the raw Pod source
41            (Unformatted)
42
43       -m module
44            Display the entire module: both code and unformatted pod documen‐
45            tation.  This may be useful if the docs don't explain a function
46            in the detail you need, and you'd like to inspect the code
47            directly; perldoc will find the file for you and simply hand it
48            off for display.
49
50       -l   Display only the file name of the module found.
51
52       -F   Consider arguments as file names; no search in directories will be
53            performed.
54
55       -f perlfunc
56            The -f option followed by the name of a perl built in function
57            will extract the documentation of this function from perlfunc.
58
59            Example:
60
61                  perldoc -f sprintf
62
63       -q perlfaq-search-regexp
64            The -q option takes a regular expression as an argument.  It will
65            search the question headings in perlfaq[1-9] and print the entries
66            matching the regular expression.  Example: "perldoc -q shuffle"
67
68       -T   This specifies that the output is not to be sent to a pager, but
69            is to be sent right to STDOUT.
70
71       -d destination-filename
72            This specifies that the output is to be sent neither to a pager
73            nor to STDOUT, but is to be saved to the specified filename.
74            Example: "perldoc -oLaTeX -dtextwrapdocs.tex Text::Wrap"
75
76       -o output-formatname
77            This specifies that you want Perldoc to try using a Pod-formatting
78            class for the output format that you specify.  For example:
79            "-oman".  This is actually just a wrapper around the "-M" switch;
80            using "-oformatname" just looks for a loadable class by adding
81            that format name (with different capitalizations) to the end of
82            different classname prefixes.
83
84            For example, "-oLaTeX" currently tries all of the following
85            classes: Pod::Perldoc::ToLaTeX Pod::Perldoc::Tolatex Pod::Perl‐
86            doc::ToLatex Pod::Perldoc::ToLATEX Pod::Simple::LaTeX Pod::Sim‐
87            ple::latex Pod::Simple::Latex Pod::Simple::LATEX Pod::LaTeX
88            Pod::latex Pod::Latex Pod::LATEX.
89
90       -M module-name
91            This specifies the module that you want to try using for format‐
92            ting the pod.  The class must at least provide a "parse_from_file"
93            method.  For example: "perldoc -MPod::Perldoc::ToChecker".
94
95            You can specify several classes to try by joining them with commas
96            or semicolons, as in "-MTk::SuperPod;Tk::Pod".
97
98       -w option:value or -w option
99            This specifies an option to call the formatter with.  For example,
100            "-w textsize:15" will call "$formatter->textsize(15)" on the for‐
101            matter object before it is used to format the object.  For this to
102            be valid, the formatter class must provide such a method, and the
103            value you pass should be valid.  (So if "textsize" expects an
104            integer, and you do "-w textsize:big", expect trouble.)
105
106            You can use "-w optionname" (without a value) as shorthand for "-w
107            optionname:TRUE".  This is presumably useful in cases of on/off
108            features like: "-w page_numbering".
109
110            You can use a "=" instead of the ":", as in: "-w textsize=15".
111            This might be more (or less) convenient, depending on what shell
112            you use.
113
114       -X   Use an index if it is present -- the -X option looks for an entry
115            whose basename matches the name given on the command line in the
116            file "$Config{archlib}/pod.idx". The pod.idx file should contain
117            fully qualified filenames, one per line.
118
119       PageName⎪ModuleName⎪ProgramName
120            The item you want to look up.  Nested modules (such as
121            "File::Basename") are specified either as "File::Basename" or
122            "File/Basename".  You may also give a descriptive name of a page,
123            such as "perlfunc".
124
125       -n some-formatter
126            Specify replacement for nroff
127
128       -r   Recursive search.
129
130       -i   Ignore case.
131
132       -V   Displays the version of perldoc you're running.
133

SECURITY

135       Because perldoc does not run properly tainted, and is known to have
136       security issues, when run as the superuser it will attempt to drop
137       privileges by setting the effective and real IDs to nobody's or
138       nouser's account, or -2 if unavailable.  If it cannot relinquish its
139       privileges, it will not run.
140

ENVIRONMENT

142       Any switches in the "PERLDOC" environment variable will be used before
143       the command line arguments.
144
145       Useful values for "PERLDOC" include "-oman", "-otext", "-otk", "-ortf",
146       "-oxml", and so on, depending on what modules you have on hand; or
147       exactly specify the formatter class with "-MPod::Perldoc::ToMan" or the
148       like.
149
150       "perldoc" also searches directories specified by the "PERL5LIB" (or
151       "PERLLIB" if "PERL5LIB" is not defined) and "PATH" environment vari‐
152       ables.  (The latter is so that embedded pods for executables, such as
153       "perldoc" itself, are available.)
154
155       "perldoc" will use, in order of preference, the pager defined in "PERL‐
156       DOC_PAGER", "MANPAGER", or "PAGER" before trying to find a pager on its
157       own. ("MANPAGER" is not used if "perldoc" was told to display plain
158       text or unformatted pod.)
159
160       One useful value for "PERLDOC_PAGER" is "less -+C -E".
161
162       Having PERLDOCDEBUG set to a positive integer will make perldoc emit
163       even more descriptive output than the "-v" switch does -- the higher
164       the number, the more it emits.
165

AUTHOR

167       Current maintainer: Sean M. Burke, <sburke@cpan.org>
168
169       Past contributors are: Kenneth Albanowski <kjahds@kjahds.com>, Andy
170       Dougherty  <doughera@lafcol.lafayette.edu>, and many others.
171
172
173
174perl v5.8.8                       2005-08-08                        PERLDOC(1)
Impressum