aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/perl.xml
blob: 3a26f8eadc98abf8c0984f91c72ec3312779bf04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>

<sect1 id="ch-system-perl" role="wrap">
  <?dbhtml filename="perl.html"?>

  <sect1info condition="script">
    <productname>perl</productname>
    <productnumber>&perl-version;</productnumber>
    <address>&perl-url;</address>
  </sect1info>

  <title>Perl-&perl-version;</title>

  <indexterm zone="ch-system-perl">
    <primary sortas="a-Perl">Perl</primary>
  </indexterm>

  <sect2 role="package">
    <title/>

    <para>The Perl package contains the Practical Extraction and Report
    Language.</para>

    <segmentedlist>
      <segtitle>&buildtime;</segtitle>
      <segtitle>&diskspace;</segtitle>

      <seglistitem>
        <seg>&perl-ch6-sbu;</seg>
        <seg>&perl-ch6-du;</seg>
      </seglistitem>
    </segmentedlist>

  </sect2>

  <sect2 role="installation">
    <title>Installation of Perl</title>

    <para>First create a basic <filename>/etc/hosts</filename> file to be
    referenced in one of Perl's configuration files as well as the optional
    testsuite:</para>

<screen><userinput remap="pre">echo "127.0.0.1 localhost $(hostname)" &gt; /etc/hosts</userinput></screen>

    <para>Fix a problem where invalid utf-8 characters cause a segmentation 
    fault:</para>

<screen><userinput remap="pre">patch -Np1 -i ../&perl-utf8-patch;</userinput></screen>

    <para>This version of Perl now builds the Compress::Raw::Zlib module. By
    default Perl will use an internal copy of the Zlib source for the build.
    Issue the following command so that Perl will use the Zlib library
    installed on the system:</para>

<screen><userinput remap="pre">sed -i -e "s|BUILD_ZLIB\s*= True|BUILD_ZLIB = False|"           \
       -e "s|INCLUDE\s*= ./zlib-src|INCLUDE    = /usr/include|" \
       -e "s|LIB\s*= ./zlib-src|LIB        = /usr/lib|"         \
    ext/Compress-Raw-Zlib/config.in</userinput></screen>

    <para>To have full control over the way Perl is set up, you can run the
    interactive <command>Configure</command> script and hand-pick the way this
    package is built. If you prefer, you can use the defaults that Perl
    auto-detects, by preparing Perl for compilation with:</para>

<screen><userinput remap="configure">sh Configure -des -Dprefix=/usr \
                  -Dvendorprefix=/usr           \
                  -Dman1dir=/usr/share/man/man1 \
                  -Dman3dir=/usr/share/man/man3 \
                  -Dpager="/usr/bin/less -isR"</userinput></screen>

    <variablelist>
      <title>The meaning of the configure options:</title>

      <varlistentry>
        <term><parameter>-Dvendorprefix=/usr</parameter></term>
        <listitem>
          <para>This ensures <command>perl</command> knows how to
          tell packages where they should install their perl modules.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>-Dpager="/usr/bin/less -isR"</parameter></term>
        <listitem>
          <para>This corrects an error in the way that <command>perldoc</command>
          invokes the <command>less</command> program.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>-Dman1dir=/usr/share/man/man1
        -Dman3dir=/usr/share/man/man3</parameter></term>
        <listitem>
          <para>Since Groff is not installed yet, <command>Configure</command>
          thinks that we do not want man pages for Perl.  Issuing these
          parameters overrides this decision.</para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>Compile the package:</para>

<screen><userinput remap="make">make</userinput></screen>

    <para>To test the results (approximately 2.5 SBU), issue:</para>

<screen><userinput remap="test">make test</userinput></screen>

    <para>Install the package:</para>

<screen><userinput remap="install">make install</userinput></screen>

  </sect2>

  <sect2 id="contents-perl" role="content">
    <title>Contents of Perl</title>

    <segmentedlist>
      <segtitle>Installed programs</segtitle>
      <segtitle>Installed libraries</segtitle>

      <seglistitem>
        <seg>a2p, c2ph, config_data, corelist, cpan, cpan2dist, cpanp,
        cpanp-run-perl, dprofpp, enc2xs, find2perl, h2ph, h2xs,
        instmodsh, libnetcfg, perl, perl&perl-version; (link to perl),
        perlbug, perldoc, perlivp, piconv, pl2pm, pod2html, pod2latex,
        pod2man, pod2text, pod2usage, podchecker, podselect, prove,
        psed (link to s2p), pstruct (link to c2ph), ptar, ptardiff, s2p,
        shasum, splain, and xsubpp</seg>
        <seg>Several hundred which cannot all be listed here</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="a2p">
        <term><command>a2p</command></term>
        <listitem>
          <para>Translates awk to Perl</para>
          <indexterm zone="ch-system-perl a2p">
            <primary sortas="b-a2p">a2p</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="c2ph">
        <term><command>c2ph</command></term>
        <listitem>
          <para>Dumps C structures as generated from
          <command>cc -g -S</command></para>
          <indexterm zone="ch-system-perl c2ph">
            <primary sortas="b-c2ph">c2ph</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="config_data">
        <term><command>config_data</command></term>
        <listitem>
          <para>Queries or changes configuration of Perl modules</para>
          <indexterm zone="ch-system-perl config_data">
            <primary sortas="b-config_data">config_data</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="corelist">
        <term><command>corelist</command></term>
        <listitem>
          <para>A commandline frontend to Module::CoreList</para>
          <indexterm zone="ch-system-perl corelist">
            <primary sortas="b-corelist">corelist</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="cpan">
        <term><command>cpan</command></term>
        <listitem>
          <para>Interact with the Comprehensive Perl Archive Network (CPAN)
          from the command line</para>
          <indexterm zone="ch-system-perl cpan">
            <primary sortas="b-cpan">cpan</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="cpan2dist">
        <term><command>cpan2dist</command></term>
        <listitem>
          <para>The CPANPLUS distribution creator</para>
          <indexterm zone="ch-system-perl cpan2dist">
            <primary sortas="b-cpan2dist">cpan2dist</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="cpanp">
        <term><command>cpanp</command></term>
        <listitem>
          <para>The CPANPLUS launcher</para>
          <indexterm zone="ch-system-perl cpanp">
            <primary sortas="b-cpanp">cpanp</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="cpanp-run-perl">
        <term><command>cpanp-run-perl</command></term>
        <listitem>
          <para>Perl script that is used to enable flushing of the output 
          buffer after each write in spawned processes</para>
          <indexterm zone="ch-system-perl cpanp-run-perl">
            <primary sortas="b-cpanp-run-perl">cpanp-run-perl</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="dprofpp">
        <term><command>dprofpp</command></term>
        <listitem>
          <para>Displays Perl profile data</para>
          <indexterm zone="ch-system-perl dprofpp">
            <primary sortas="b-dprofpp">dprofpp</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="enc2xs">
        <term><command>enc2xs</command></term>
        <listitem>
          <para>Builds a Perl extension for the Encode module from either
          Unicode Character Mappings or Tcl Encoding Files</para>
          <indexterm zone="ch-system-perl enc2xs">
            <primary sortas="b-enc2xs">enc2xs</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="find2perl">
        <term><command>find2perl</command></term>
        <listitem>
          <para>Translates <command>find</command> commands to Perl</para>
          <indexterm zone="ch-system-perl find2perl">
            <primary sortas="b-find2perl">find2perl</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="h2ph">
        <term><command>h2ph</command></term>
        <listitem>
          <para>Converts <filename class="extension">.h</filename> C header
          files to <filename class="extension">.ph</filename> Perl header
          files</para>
          <indexterm zone="ch-system-perl h2ph">
            <primary sortas="b-h2ph">h2ph</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="h2xs">
        <term><command>h2xs</command></term>
        <listitem>
          <para>Converts <filename class="extension">.h</filename> C header
          files to Perl extensions</para>
          <indexterm zone="ch-system-perl h2xs">
            <primary sortas="b-h2xs">h2xs</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="instmodsh">
        <term><command>instmodsh</command></term>
        <listitem>
          <para>Shell script for examining installed Perl modules,
          and can even create a tarball from an installed module</para>
          <indexterm zone="ch-system-perl instmodsh">
            <primary sortas="b-instmodsh">instmodsh</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libnetcfg">
        <term><command>libnetcfg</command></term>
        <listitem>
          <para>Can be used to configure the
          <filename class="libraryfile">libnet</filename></para>
          <indexterm zone="ch-system-perl libnetcfg">
            <primary sortas="b-libnetcfg">libnetcfg</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="perl">
        <term><command>perl</command></term>
        <listitem>
          <para>Combines some of the best features of C, <command>sed</command>,
          <command>awk</command> and <command>sh</command> into a single
          swiss-army language</para>
          <indexterm zone="ch-system-perl perl">
            <primary sortas="b-perl">perl</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="perl-version">
        <term><command>perl&perl-version;</command></term>
        <listitem>
          <para>A hard link to <command>perl</command></para>
          <indexterm zone="ch-system-perl perl-version">
            <primary sortas="b-perl&perl-version;">perl&perl-version;</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="perlbug">
        <term><command>perlbug</command></term>
        <listitem>
          <para>Used to generate bug reports about Perl, or the modules that come
          with it, and mail them</para>
          <indexterm zone="ch-system-perl perlbug">
            <primary sortas="b-perlbug">perlbug</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="perldoc">
        <term><command>perldoc</command></term>
        <listitem>
          <para>Displays a piece of documentation in pod format that is embedded
          in the Perl installation tree or in a Perl script</para>
          <indexterm zone="ch-system-perl perldoc">
            <primary sortas="b-perldoc">perldoc</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="perlivp">
        <term><command>perlivp</command></term>
        <listitem>
          <para>The Perl Installation Verification Procedure; it can be used to
          verify that Perl and its libraries have been installed
          correctly</para>
          <indexterm zone="ch-system-perl perlivp">
            <primary sortas="b-perlivp">perlivp</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="piconv">
        <term><command>piconv</command></term>
        <listitem>
          <para>A Perl version of the character encoding converter
          <command>iconv</command></para>
          <indexterm zone="ch-system-perl piconv">
            <primary sortas="b-piconv">piconv</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pl2pm">
        <term><command>pl2pm</command></term>
        <listitem>
          <para>A rough tool for converting Perl4
          <filename class="extension">.pl</filename> files to Perl5
          <filename class="extension">.pm</filename> modules</para>
          <indexterm zone="ch-system-perl pl2pm">
            <primary sortas="b-pl2pm">pl2pm</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pod2html">
        <term><command>pod2html</command></term>
        <listitem>
          <para>Converts files from pod format to HTML format</para>
          <indexterm zone="ch-system-perl pod2html">
            <primary sortas="b-pod2html">pod2html</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pod2latex">
        <term><command>pod2latex</command></term>
        <listitem>
          <para>Converts files from pod format to LaTeX format</para>
          <indexterm zone="ch-system-perl pod2latex">
            <primary sortas="b-pod2latex">pod2latex</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pod2man">
        <term><command>pod2man</command></term>
        <listitem>
          <para>Converts pod data to formatted *roff input</para>
          <indexterm zone="ch-system-perl pod2man">
            <primary sortas="b-pod2man">pod2man</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pod2text">
        <term><command>pod2text</command></term>
        <listitem>
          <para>Converts pod data to formatted ASCII text</para>
          <indexterm zone="ch-system-perl pod2text">
            <primary sortas="b-pod2text">pod2text</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pod2usage">
        <term><command>pod2usage</command></term>
        <listitem>
          <para>Prints usage messages from embedded pod docs in files</para>
          <indexterm zone="ch-system-perl pod2usage">
            <primary sortas="b-pod2usage">pod2usage</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="podchecker">
        <term><command>podchecker</command></term>
        <listitem>
          <para>Checks the syntax of pod format documentation files</para>
          <indexterm zone="ch-system-perl podchecker">
            <primary sortas="b-podchecker">podchecker</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="podselect">
        <term><command>podselect</command></term>
        <listitem>
          <para>Displays selected sections of pod documentation</para>
          <indexterm zone="ch-system-perl podselect">
            <primary sortas="b-podselect">podselect</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="prove">
        <term><command>prove</command></term>
        <listitem>
          <para>Command line tool for running tests against the Test::Harness
          module.</para>
          <indexterm zone="ch-system-perl prove">
            <primary sortas="b-prove">prove</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="psed">
        <term><command>psed</command></term>
        <listitem>
          <para>A Perl version of the stream editor <command>sed</command></para>
          <indexterm zone="ch-system-perl psed">
            <primary sortas="b-psed">psed</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="pstruct">
        <term><command>pstruct</command></term>
        <listitem>
          <para>Dumps C structures as generated from <command>cc -g -S</command>
          stabs</para>
          <indexterm zone="ch-system-perl pstruct">
            <primary sortas="b-pstruct">pstruct</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="ptar">
        <term><command>ptar</command></term>
        <listitem>
          <para>A <command>tar</command>-like program written in Perl</para>
          <indexterm zone="ch-system-perl ptar">
            <primary sortas="b-ptar">ptar</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="ptardiff">
        <term><command>ptardiff</command></term>
        <listitem>
          <para>A Perl program that compares an extracted archive with an
          unextracted one</para>
          <indexterm zone="ch-system-perl ptardiff">
            <primary sortas="b-ptardiff">ptardiff</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="s2p">
        <term><command>s2p</command></term>
        <listitem>
          <para>Translates <command>sed</command> scripts to Perl</para>
          <indexterm zone="ch-system-perl s2p">
            <primary sortas="b-s2p">s2p</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="shasum">
        <term><command>shasum</command></term>
        <listitem>
          <para>Prints or checks SHA checksums</para>
          <indexterm zone="ch-system-perl shasum">
            <primary sortas="b-shasum">shasum</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="splain">
        <term><command>splain</command></term>
        <listitem>
          <para>Is used to force verbose warning diagnostics in Perl</para>
          <indexterm zone="ch-system-perl splain">
            <primary sortas="b-splain">splain</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="xsubpp">
        <term><command>xsubpp</command></term>
        <listitem>
          <para>Converts Perl XS code into C code</para>
          <indexterm zone="ch-system-perl xsubpp">
            <primary sortas="b-xsubpp">xsubpp</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>