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

NAME

6       perlutil - utilities packaged with the Perl distribution
7

DESCRIPTION

9       Along with the Perl interpreter itself, the Perl distribution installs
10       a range of utilities on your system. There are also several utilities
11       which are used by the Perl distribution itself as part of the install
12       process. This document exists to list all of these utilities, explain
13       what they are for and provide pointers to each module's documentation,
14       if appropriate.
15

LIST OF UTILITIES

17   Documentation
18       perldoc
19          The main interface to Perl's documentation is "perldoc", although if
20          you're reading this, it's more than likely that you've already found
21          it. perldoc will extract and format the documentation from any file
22          in the current directory, any Perl module installed on the system,
23          or any of the standard documentation pages, such as this one. Use
24          "perldoc <name>" to get information on any of the utilities
25          described in this document.
26
27       pod2man and pod2text
28          If it's run from a terminal, perldoc will usually call pod2man to
29          translate POD (Plain Old Documentation - see perlpod for an
30          explanation) into a manpage, and then run man to display it; if man
31          isn't available, pod2text will be used instead and the output piped
32          through your favourite pager.
33
34       pod2html and pod2latex
35          As well as these two, there are two other converters: pod2html will
36          produce HTML pages from POD, and pod2latex, which produces LaTeX
37          files.
38
39       pod2usage
40          If you just want to know how to use the utilities described here,
41          pod2usage will just extract the "USAGE" section; some of the
42          utilities will automatically call pod2usage on themselves when you
43          call them with "-help".
44
45       podselect
46          pod2usage is a special case of podselect, a utility to extract named
47          sections from documents written in POD. For instance, while
48          utilities have "USAGE" sections, Perl modules usually have
49          "SYNOPSIS" sections: "podselect -s "SYNOPSIS" ..." will extract this
50          section for a given file.
51
52       podchecker
53          If you're writing your own documentation in POD, the podchecker
54          utility will look for errors in your markup.
55
56       splain
57          splain is an interface to perldiag - paste in your error message to
58          it, and it'll explain it for you.
59
60       roffitall
61          The "roffitall" utility is not installed on your system but lives in
62          the pod/ directory of your Perl source kit; it converts all the
63          documentation from the distribution to *roff format, and produces a
64          typeset PostScript or text file of the whole lot.
65
66   Convertors
67       To help you convert legacy programs to Perl, we've included three
68       conversion filters:
69
70       a2p
71          a2p converts awk scripts to Perl programs; for example, "a2p -F:" on
72          the simple awk script "{print $2}" will produce a Perl program based
73          around this code:
74
75              while (<>) {
76                  ($Fld1,$Fld2) = split(/[:\n]/, $_, 9999);
77                  print $Fld2;
78              }
79
80       s2p and psed
81          Similarly, s2p converts sed scripts to Perl programs. s2p run on
82          "s/foo/bar" will produce a Perl program based around this:
83
84              while (<>) {
85                  chomp;
86                  s/foo/bar/g;
87                  print if $printit;
88              }
89
90          When invoked as psed, it behaves as a sed implementation, written in
91          Perl.
92
93       find2perl
94          Finally, find2perl translates "find" commands to Perl equivalents
95          which use the File::Find module. As an example, "find2perl . -user
96          root -perm 4000 -print" produces the following callback subroutine
97          for "File::Find":
98
99              sub wanted {
100                  my ($dev,$ino,$mode,$nlink,$uid,$gid);
101                  (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
102                  $uid == $uid{'root'}) &&
103                  (($mode & 0777) == 04000);
104                  print("$name\n");
105              }
106
107       As well as these filters for converting other languages, the pl2pm
108       utility will help you convert old-style Perl 4 libraries to new-style
109       Perl5 modules.
110
111   Administration
112       config_data
113          Query or change configuration of Perl modules that use
114          Module::Build-based configuration files for features and config
115          data.
116
117       libnetcfg
118          To display and change the libnet configuration run the libnetcfg
119          command.
120
121       perlivp
122          The perlivp program is set up at Perl source code build time to test
123          the Perl version it was built under.  It can be used after running
124          "make install" (or your platform's equivalent procedure) to verify
125          that perl and its libraries have been installed correctly.
126
127   Development
128       There are a set of utilities which help you in developing Perl
129       programs, and in particular, extending Perl with C.
130
131       perlbug
132          perlbug is the recommended way to report bugs in the perl
133          interpreter itself or any of the standard library modules back to
134          the developers; please read through the documentation for perlbug
135          thoroughly before using it to submit a bug report.
136
137       perlthanks
138          This program provides an easy way to send a thank-you message back
139          to the authors and maintainers of perl. It's just perlbug installed
140          under another name.
141
142       h2ph
143          Back before Perl had the XS system for connecting with C libraries,
144          programmers used to get library constants by reading through the C
145          header files. You may still see "require 'syscall.ph'" or similar
146          around - the .ph file should be created by running h2ph on the
147          corresponding .h file. See the h2ph documentation for more on how to
148          convert a whole bunch of header files at once.
149
150       c2ph and pstruct
151          c2ph and pstruct, which are actually the same program but behave
152          differently depending on how they are called, provide another way of
153          getting at C with Perl - they'll convert C structures and union
154          declarations to Perl code. This is deprecated in favour of h2xs
155          these days.
156
157       h2xs
158          h2xs converts C header files into XS modules, and will try and write
159          as much glue between C libraries and Perl modules as it can. It's
160          also very useful for creating skeletons of pure Perl modules.
161
162       enc2xs
163          enc2xs builds a Perl extension for use by Encode from either Unicode
164          Character Mapping files (.ucm) or Tcl Encoding Files (.enc).
165          Besides being used internally during the build process of the Encode
166          module, you can use enc2xs to add your own encoding to perl.  No
167          knowledge of XS is necessary.
168
169       xsubpp
170          xsubpp is a compiler to convert Perl XS code into C code.  It is
171          typically run by the makefiles created by ExtUtils::MakeMaker.
172
173          xsubpp will compile XS code into C code by embedding the constructs
174          necessary to let C functions manipulate Perl values and creates the
175          glue necessary to let Perl access those functions.
176
177       dprofpp
178          Perl comes with a profiler, the Devel::DProf module. The dprofpp
179          utility analyzes the output of this profiler and tells you which
180          subroutines are taking up the most run time. See Devel::DProf for
181          more information.
182
183       prove
184          prove is a command-line interface to the test-running functionality
185          of of Test::Harness.  It's an alternative to "make test".
186
187       corelist
188          A command-line front-end to "Module::CoreList", to query what
189          modules were shipped with given versions of perl.
190
191   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
195       piconv
196          piconv is a Perl version of iconv, a character encoding converter
197          widely available for various Unixen today.  This script was
198          primarily a technology demonstrator for Perl 5.8.0, but you can use
199          piconv in the place of iconv for virtually any case.
200
201       ptar
202          ptar is a tar-like program, written in pure Perl.
203
204       ptardiff
205          ptardiff is a small utility that produces a diff between an
206          extracted archive and an unextracted one. (Note that this utility
207          requires the "Text::Diff" module to function properly; this module
208          isn't distributed with perl, but is available from the CPAN.)
209
210       shasum
211          This utility, that comes with the "Digest::SHA" module, is used to
212          print or verify SHA checksums.
213
214   Installation
215       These utilities help manage extra Perl modules that don't come with the
216       perl distribution.
217
218       cpan
219          cpan is a command-line interface to CPAN.pm.  It allows you to
220          install modules or distributions from CPAN, or just get information
221          about them, and a lot more.  It is similar to the command line mode
222          of the CPAN module,
223
224              perl -MCPAN -e shell
225
226       cpanp
227          cpanp is, like cpan, a command-line interface to the CPAN, using the
228          "CPANPLUS" module as a back-end. It can be used interactively or
229          imperatively.
230
231       cpan2dist
232          cpan2dist is a tool to create distributions (or packages) from CPAN
233          modules, then suitable for your package manager of choice. Support
234          for specific formats are available from CPAN as "CPANPLUS::Dist::*"
235          modules.
236
237       instmodsh
238          A little interface to ExtUtils::Installed to examine installed
239          modules, validate your packlists and even create a tarball from an
240          installed module.
241

SEE ALSO

243       perldoc, pod2man, perlpod, pod2html, pod2usage, podselect, podchecker,
244       splain, perldiag, roffitall, a2p, s2p, find2perl, File::Find, pl2pm,
245       perlbug, h2ph, c2ph, h2xs, dprofpp, Devel::DProf, enc2xs, xsubpp, cpan,
246       cpanp, cpan2dist, instmodsh, piconv, prove, corelist, ptar, ptardiff,
247       shasum
248
249
250
251perl v5.10.1                      2009-02-12                       PERLUTIL(1)
Impressum