Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 |
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 "PERLUTIL 1" | |
132 | .TH PERLUTIL 1 "2006-01-07" "perl v5.8.8" "Perl Programmers Reference Guide" | |
133 | .SH "NAME" | |
134 | perlutil \- utilities packaged with the Perl distribution | |
135 | .SH "DESCRIPTION" | |
136 | .IX Header "DESCRIPTION" | |
137 | Along with the Perl interpreter itself, the Perl distribution installs a | |
138 | range of utilities on your system. There are also several utilities | |
139 | which are used by the Perl distribution itself as part of the install | |
140 | process. This document exists to list all of these utilities, explain | |
141 | what they are for and provide pointers to each module's documentation, | |
142 | if appropriate. | |
143 | .Sh "\s-1DOCUMENTATION\s0" | |
144 | .IX Subsection "DOCUMENTATION" | |
145 | .IP "perldoc" 3 | |
146 | .IX Item "perldoc" | |
147 | The main interface to Perl's documentation is \f(CW\*(C`perldoc\*(C'\fR, although | |
148 | if you're reading this, it's more than likely that you've already found | |
149 | it. \fIperldoc\fR will extract and format the documentation from any file | |
150 | in the current directory, any Perl module installed on the system, or | |
151 | any of the standard documentation pages, such as this one. Use | |
152 | \&\f(CW\*(C`perldoc <name>\*(C'\fR to get information on any of the utilities | |
153 | described in this document. | |
154 | .IP "pod2man and pod2text" 3 | |
155 | .IX Item "pod2man and pod2text" | |
156 | If it's run from a terminal, \fIperldoc\fR will usually call \fIpod2man\fR to | |
157 | translate \s-1POD\s0 (Plain Old Documentation \- see perlpod for an | |
158 | explanation) into a manpage, and then run \fIman\fR to display it; if | |
159 | \&\fIman\fR isn't available, \fIpod2text\fR will be used instead and the output | |
160 | piped through your favourite pager. | |
161 | .IP "pod2html and pod2latex" 3 | |
162 | .IX Item "pod2html and pod2latex" | |
163 | As well as these two, there are two other converters: \fIpod2html\fR will | |
164 | produce \s-1HTML\s0 pages from \s-1POD\s0, and \fIpod2latex\fR, which produces LaTeX | |
165 | files. | |
166 | .IP "pod2usage" 3 | |
167 | .IX Item "pod2usage" | |
168 | If you just want to know how to use the utilities described here, | |
169 | \&\fIpod2usage\fR will just extract the \*(L"\s-1USAGE\s0\*(R" section; some of | |
170 | the utilities will automatically call \fIpod2usage\fR on themselves when | |
171 | you call them with \f(CW\*(C`\-help\*(C'\fR. | |
172 | .IP "podselect" 3 | |
173 | .IX Item "podselect" | |
174 | \&\fIpod2usage\fR is a special case of \fIpodselect\fR, a utility to extract | |
175 | named sections from documents written in \s-1POD\s0. For instance, while | |
176 | utilities have \*(L"\s-1USAGE\s0\*(R" sections, Perl modules usually have \*(L"\s-1SYNOPSIS\s0\*(R" | |
177 | sections: \f(CW\*(C`podselect \-s "SYNOPSIS" ...\*(C'\fR will extract this section for | |
178 | a given file. | |
179 | .IP "podchecker" 3 | |
180 | .IX Item "podchecker" | |
181 | If you're writing your own documentation in \s-1POD\s0, the \fIpodchecker\fR | |
182 | utility will look for errors in your markup. | |
183 | .IP "splain" 3 | |
184 | .IX Item "splain" | |
185 | \&\fIsplain\fR is an interface to perldiag \- paste in your error message | |
186 | to it, and it'll explain it for you. | |
187 | .IP "roffitall" 3 | |
188 | .IX Item "roffitall" | |
189 | The \f(CW\*(C`roffitall\*(C'\fR utility is not installed on your system but lives in | |
190 | the \fIpod/\fR directory of your Perl source kit; it converts all the | |
191 | documentation from the distribution to \fI*roff\fR format, and produces a | |
192 | typeset PostScript or text file of the whole lot. | |
193 | .Sh "\s-1CONVERTORS\s0" | |
194 | .IX Subsection "CONVERTORS" | |
195 | To help you convert legacy programs to Perl, we've included three | |
196 | conversion filters: | |
197 | .IP "a2p" 3 | |
198 | .IX Item "a2p" | |
199 | \&\fIa2p\fR converts \fIawk\fR scripts to Perl programs; for example, \f(CW\*(C`a2p \-F:\*(C'\fR | |
200 | on the simple \fIawk\fR script \f(CW\*(C`{print $2}\*(C'\fR will produce a Perl program | |
201 | based around this code: | |
202 | .Sp | |
203 | .Vb 4 | |
204 | \& while (<>) { | |
205 | \& ($Fld1,$Fld2) = split(/[:\en]/, $_, 9999); | |
206 | \& print $Fld2; | |
207 | \& } | |
208 | .Ve | |
209 | .IP "s2p" 3 | |
210 | .IX Item "s2p" | |
211 | Similarly, \fIs2p\fR converts \fIsed\fR scripts to Perl programs. \fIs2p\fR run | |
212 | on \f(CW\*(C`s/foo/bar\*(C'\fR will produce a Perl program based around this: | |
213 | .Sp | |
214 | .Vb 5 | |
215 | \& while (<>) { | |
216 | \& chomp; | |
217 | \& s/foo/bar/g; | |
218 | \& print if $printit; | |
219 | \& } | |
220 | .Ve | |
221 | .IP "find2perl" 3 | |
222 | .IX Item "find2perl" | |
223 | Finally, \fIfind2perl\fR translates \f(CW\*(C`find\*(C'\fR commands to Perl equivalents which | |
224 | use the File::Find module. As an example, | |
225 | \&\f(CW\*(C`find2perl . \-user root \-perm 4000 \-print\*(C'\fR produces the following callback | |
226 | subroutine for \f(CW\*(C`File::Find\*(C'\fR: | |
227 | .Sp | |
228 | .Vb 7 | |
229 | \& sub wanted { | |
230 | \& my ($dev,$ino,$mode,$nlink,$uid,$gid); | |
231 | \& (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && | |
232 | \& $uid == $uid{'root'}) && | |
233 | \& (($mode & 0777) == 04000); | |
234 | \& print("$name\en"); | |
235 | \& } | |
236 | .Ve | |
237 | .PP | |
238 | As well as these filters for converting other languages, the | |
239 | pl2pm utility will help you convert old-style Perl 4 libraries to | |
240 | new-style Perl5 modules. | |
241 | .Sh "Administration" | |
242 | .IX Subsection "Administration" | |
243 | .IP "libnetcfg" 3 | |
244 | .IX Item "libnetcfg" | |
245 | To display and change the libnet configuration run the libnetcfg command. | |
246 | .Sh "Development" | |
247 | .IX Subsection "Development" | |
248 | There are a set of utilities which help you in developing Perl programs, | |
249 | and in particular, extending Perl with C. | |
250 | .IP "perlbug" 3 | |
251 | .IX Item "perlbug" | |
252 | \&\fIperlbug\fR is the recommended way to report bugs in the perl interpreter | |
253 | itself or any of the standard library modules back to the developers; | |
254 | please read through the documentation for \fIperlbug\fR thoroughly before | |
255 | using it to submit a bug report. | |
256 | .IP "h2ph" 3 | |
257 | .IX Item "h2ph" | |
258 | Back before Perl had the \s-1XS\s0 system for connecting with C libraries, | |
259 | programmers used to get library constants by reading through the C | |
260 | header files. You may still see \f(CW\*(C`require 'syscall.ph'\*(C'\fR or similar | |
261 | around \- the \fI.ph\fR file should be created by running \fIh2ph\fR on the | |
262 | corresponding \fI.h\fR file. See the \fIh2ph\fR documentation for more on how | |
263 | to convert a whole bunch of header files at once. | |
264 | .IP "c2ph and pstruct" 3 | |
265 | .IX Item "c2ph and pstruct" | |
266 | \&\fIc2ph\fR and \fIpstruct\fR, which are actually the same program but behave | |
267 | differently depending on how they are called, provide another way of | |
268 | getting at C with Perl \- they'll convert C structures and union declarations | |
269 | to Perl code. This is deprecated in favour of \fIh2xs\fR these days. | |
270 | .IP "h2xs" 3 | |
271 | .IX Item "h2xs" | |
272 | \&\fIh2xs\fR converts C header files into \s-1XS\s0 modules, and will try and write | |
273 | as much glue between C libraries and Perl modules as it can. It's also | |
274 | very useful for creating skeletons of pure Perl modules. | |
275 | .IP "dprofpp" 3 | |
276 | .IX Item "dprofpp" | |
277 | Perl comes with a profiler, the \fIDevel::DProf\fR module. The | |
278 | \&\fIdprofpp\fR utility analyzes the output of this profiler and tells you | |
279 | which subroutines are taking up the most run time. See Devel::DProf | |
280 | for more information. | |
281 | .IP "perlcc" 3 | |
282 | .IX Item "perlcc" | |
283 | \&\fIperlcc\fR is the interface to the experimental Perl compiler suite. | |
284 | .Sh "\s-1SEE\s0 \s-1ALSO\s0" | |
285 | .IX Subsection "SEE ALSO" | |
286 | perldoc, pod2man, perlpod, | |
287 | pod2html, pod2usage, podselect, | |
288 | podchecker, splain, perldiag, | |
289 | roffitall, a2p, s2p, find2perl, | |
290 | File::Find, pl2pm, perlbug, | |
291 | h2ph, c2ph, h2xs, dprofpp, | |
292 | Devel::DProf, perlcc |