| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "PERLUTIL 1" |
| 58 |
.TH PERLUTIL 1 2025-11-16 "perl v5.40.1" "Perl Programmers Reference Guide" |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
perlutil \- utilities packaged with the Perl distribution |
| 65 |
.SH DESCRIPTION |
| 66 |
.IX Header "DESCRIPTION" |
| 67 |
Along with the Perl interpreter itself, the Perl distribution installs a |
| 68 |
range of utilities on your system. There are also several utilities |
| 69 |
which are used by the Perl distribution itself as part of the install |
| 70 |
process. This document exists to list all of these utilities, explain |
| 71 |
what they are for and provide pointers to each module's documentation, |
| 72 |
if appropriate. |
| 73 |
.SH "LIST OF UTILITIES" |
| 74 |
.IX Header "LIST OF UTILITIES" |
| 75 |
.SS Documentation |
| 76 |
.IX Subsection "Documentation" |
| 77 |
.IP perldoc 3 |
| 78 |
.IX Item "perldoc" |
| 79 |
The main interface to Perl's documentation is \fIperldoc\fR, although |
| 80 |
if you're reading this, it's more than likely that you've already found |
| 81 |
it. \fIperldoc\fR will extract and format the documentation from any file |
| 82 |
in the current directory, any Perl module installed on the system, or |
| 83 |
any of the standard documentation pages, such as this one. Use |
| 84 |
\&\f(CW\*(C`perldoc <name>\*(C'\fR to get information on any of the utilities |
| 85 |
described in this document. |
| 86 |
.IP pod2man 3 |
| 87 |
.IX Item "pod2man" |
| 88 |
.PD 0 |
| 89 |
.IP pod2text 3 |
| 90 |
.IX Item "pod2text" |
| 91 |
.PD |
| 92 |
If it's run from a terminal, \fIperldoc\fR will usually call \fIpod2man\fR to |
| 93 |
translate POD (Plain Old Documentation \- see perlpod for an |
| 94 |
explanation) into a manpage, and then run \fIman\fR to display it; if |
| 95 |
\&\fIman\fR isn't available, \fIpod2text\fR will be used instead and the output |
| 96 |
piped through your favourite pager. |
| 97 |
.IP pod2html 3 |
| 98 |
.IX Item "pod2html" |
| 99 |
As well as these two, there is another converter: \fIpod2html\fR will |
| 100 |
produce HTML pages from POD. |
| 101 |
.IP pod2usage 3 |
| 102 |
.IX Item "pod2usage" |
| 103 |
If you just want to know how to use the utilities described here, |
| 104 |
\&\fIpod2usage\fR will just extract the "USAGE" section; some of |
| 105 |
the utilities will automatically call \fIpod2usage\fR on themselves when |
| 106 |
you call them with \f(CW\*(C`\-help\*(C'\fR. |
| 107 |
.IP podchecker 3 |
| 108 |
.IX Item "podchecker" |
| 109 |
If you're writing your own documentation in POD, the \fIpodchecker\fR |
| 110 |
utility will look for errors in your markup. |
| 111 |
.IP splain 3 |
| 112 |
.IX Item "splain" |
| 113 |
\&\fIsplain\fR is an interface to perldiag \- paste in your error message |
| 114 |
to it, and it'll explain it for you. |
| 115 |
.IP \fIroffitall\fR 3 |
| 116 |
.IX Item "roffitall" |
| 117 |
The \fIroffitall\fR utility is not installed on your system but lives in |
| 118 |
the \fIpod/\fR directory of your Perl source kit; it converts all the |
| 119 |
documentation from the distribution to \fI*roff\fR format, and produces a |
| 120 |
typeset PostScript or text file of the whole lot. |
| 121 |
.SS Converters |
| 122 |
.IX Subsection "Converters" |
| 123 |
.IP pl2pm 3 |
| 124 |
.IX Item "pl2pm" |
| 125 |
To help you convert legacy programs to more modern Perl, the |
| 126 |
\&\fIpl2pm\fR utility will help you convert old-style Perl 4 libraries |
| 127 |
to new-style Perl5 modules. |
| 128 |
.SS Administration |
| 129 |
.IX Subsection "Administration" |
| 130 |
.IP libnetcfg 3 |
| 131 |
.IX Item "libnetcfg" |
| 132 |
To display and change the libnet configuration run the libnetcfg command. |
| 133 |
.IP perlivp 3 |
| 134 |
.IX Item "perlivp" |
| 135 |
The \fIperlivp\fR program is set up at Perl source code build time to test |
| 136 |
the Perl version it was built under. It can be used after running \f(CW\*(C`make |
| 137 |
install\*(C'\fR (or your platform's equivalent procedure) to verify that perl |
| 138 |
and its libraries have been installed correctly. |
| 139 |
.SS Development |
| 140 |
.IX Subsection "Development" |
| 141 |
There are a set of utilities which help you in developing Perl programs, |
| 142 |
and in particular, extending Perl with C. |
| 143 |
.IP perlbug 3 |
| 144 |
.IX Item "perlbug" |
| 145 |
\&\fIperlbug\fR used to be the recommended way to report bugs in the perl |
| 146 |
interpreter itself or any of the standard library modules back to the |
| 147 |
developers; bug reports and patches should now be submitted to |
| 148 |
<https://github.com/Perl/perl5/issues>. |
| 149 |
.IP perlthanks 3 |
| 150 |
.IX Item "perlthanks" |
| 151 |
This program provides an easy way to send a thank-you message back to the |
| 152 |
authors and maintainers of perl. It's just \fIperlbug\fR installed under |
| 153 |
another name. |
| 154 |
.IP h2ph 3 |
| 155 |
.IX Item "h2ph" |
| 156 |
Back before Perl had the XS system for connecting with C libraries, |
| 157 |
programmers used to get library constants by reading through the C |
| 158 |
header files. You may still see \f(CW\*(C`require\ \*(Aqsyscall.ph\*(Aq\*(C'\fR or similar |
| 159 |
around \- the \fI.ph\fR file should be created by running \fIh2ph\fR on the |
| 160 |
corresponding \fI.h\fR file. See the h2ph documentation for more on how |
| 161 |
to convert a whole bunch of header files at once. |
| 162 |
.IP h2xs 3 |
| 163 |
.IX Item "h2xs" |
| 164 |
\&\fIh2xs\fR converts C header files into XS modules, and will try and write |
| 165 |
as much glue between C libraries and Perl modules as it can. It's also |
| 166 |
very useful for creating skeletons of pure Perl modules. |
| 167 |
.IP enc2xs 3 |
| 168 |
.IX Item "enc2xs" |
| 169 |
\&\fIenc2xs\fR builds a Perl extension for use by Encode from either |
| 170 |
Unicode Character Mapping files (.ucm) or Tcl Encoding Files (.enc). |
| 171 |
Besides being used internally during the build process of the Encode |
| 172 |
module, you can use \fIenc2xs\fR to add your own encoding to perl. |
| 173 |
No knowledge of XS is necessary. |
| 174 |
.IP xsubpp 3 |
| 175 |
.IX Item "xsubpp" |
| 176 |
\&\fIxsubpp\fR is a compiler to convert Perl XS code into C code. |
| 177 |
It is typically run by the makefiles created by ExtUtils::MakeMaker. |
| 178 |
.Sp |
| 179 |
\&\fIxsubpp\fR will compile XS code into C code by embedding the constructs |
| 180 |
necessary to let C functions manipulate Perl values and creates the glue |
| 181 |
necessary to let Perl access those functions. |
| 182 |
.IP prove 3 |
| 183 |
.IX Item "prove" |
| 184 |
\&\fIprove\fR is a command-line interface to the test-running functionality |
| 185 |
of Test::Harness. It's an alternative to \f(CW\*(C`make test\*(C'\fR. |
| 186 |
.IP corelist 3 |
| 187 |
.IX Item "corelist" |
| 188 |
A command-line front-end to Module::CoreList, to query what modules |
| 189 |
were shipped with given versions of perl. |
| 190 |
.SS "General tools" |
| 191 |
.IX Subsection "General tools" |
| 192 |
A few general-purpose tools are shipped with perl, mostly because they |
| 193 |
came along modules included in the perl distribution. |
| 194 |
.IP encguess 3 |
| 195 |
.IX Item "encguess" |
| 196 |
\&\fIencguess\fR will attempt to guess the character encoding of files. |
| 197 |
.IP json_pp 3 |
| 198 |
.IX Item "json_pp" |
| 199 |
\&\fIjson_pp\fR is a pure Perl JSON converter and formatter. |
| 200 |
.IP piconv 3 |
| 201 |
.IX Item "piconv" |
| 202 |
\&\fIpiconv\fR is a Perl version of \fBiconv\fR\|(1), a character encoding converter |
| 203 |
widely available for various Unixen today. This script was primarily a |
| 204 |
technology demonstrator for Perl v5.8.0, but you can use piconv in the |
| 205 |
place of iconv for virtually any case. |
| 206 |
.IP ptar 3 |
| 207 |
.IX Item "ptar" |
| 208 |
\&\fIptar\fR is a tar-like program, written in pure Perl. |
| 209 |
.IP ptardiff 3 |
| 210 |
.IX Item "ptardiff" |
| 211 |
\&\fIptardiff\fR is a small utility that produces a diff between an extracted |
| 212 |
archive and an unextracted one. (Note that this utility requires the |
| 213 |
Text::Diff module to function properly; this module isn't distributed |
| 214 |
with perl, but is available from the CPAN.) |
| 215 |
.IP ptargrep 3 |
| 216 |
.IX Item "ptargrep" |
| 217 |
\&\fIptargrep\fR is a utility to apply pattern matching to the contents of files |
| 218 |
in a tar archive. |
| 219 |
.IP shasum 3 |
| 220 |
.IX Item "shasum" |
| 221 |
This utility, that comes with the Digest::SHA module, is used to print |
| 222 |
or verify SHA checksums. |
| 223 |
.IP streamzip 3 |
| 224 |
.IX Item "streamzip" |
| 225 |
\&\fIstreamzip\fR compresses data streamed to STDIN into a streamed zip container. |
| 226 |
.IP zipdetails 3 |
| 227 |
.IX Item "zipdetails" |
| 228 |
\&\fIzipdetails\fR displays information about the internal record structure of the zip file. |
| 229 |
It is not concerned with displaying any details of the compressed data stored in the zip file. |
| 230 |
.SS Installation |
| 231 |
.IX Subsection "Installation" |
| 232 |
These utilities help manage extra Perl modules that don't come with the perl |
| 233 |
distribution. |
| 234 |
.IP cpan 3 |
| 235 |
.IX Item "cpan" |
| 236 |
\&\fIcpan\fR is a command-line interface to CPAN.pm. It allows you to install |
| 237 |
modules or distributions from CPAN, or just get information about them, and |
| 238 |
a lot more. It is similar to the command line mode of the CPAN module, |
| 239 |
.Sp |
| 240 |
.Vb 1 |
| 241 |
\& perl \-MCPAN \-e shell |
| 242 |
.Ve |
| 243 |
.IP instmodsh 3 |
| 244 |
.IX Item "instmodsh" |
| 245 |
A little interface to ExtUtils::Installed to examine installed modules, |
| 246 |
validate your packlists and even create a tarball from an installed module. |
| 247 |
.SH "SEE ALSO" |
| 248 |
.IX Header "SEE ALSO" |
| 249 |
perldoc, pod2man, pod2text, pod2html, pod2usage, |
| 250 |
podchecker, splain, pl2pm, |
| 251 |
perlbug, h2ph, h2xs, enc2xs, |
| 252 |
xsubpp, cpan, encguess, instmodsh, json_pp, |
| 253 |
piconv, prove, corelist, ptar, |
| 254 |
ptardiff, shasum, streamzip, zipdetails |