source: chapter06/perl.xml@ 03b7436

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 03b7436 was 9f5aaf7, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Add whitespace for better readability of instructions

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9771 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 20.3 KB
RevLine 
[673b0d8]1<?xml version="1.0" encoding="ISO-8859-1"?>
[b06ca36]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[673b0d8]4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
[3f3931b0]7
[81fd230]8<sect1 id="ch-system-perl" role="wrap">
[3f3931b0]9 <?dbhtml filename="perl.html"?>
10
[e747759]11 <sect1info condition="script">
12 <productname>perl</productname>
13 <productnumber>&perl-version;</productnumber>
14 <address>&perl-url;</address>
15 </sect1info>
16
[3f3931b0]17 <title>Perl-&perl-version;</title>
18
19 <indexterm zone="ch-system-perl">
20 <primary sortas="a-Perl">Perl</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
[673b0d8]25
[3f3931b0]26 <para>The Perl package contains the Practical Extraction and Report
27 Language.</para>
[6370fa6]28
[3f3931b0]29 <segmentedlist>
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
[5888299]32
[3f3931b0]33 <seglistitem>
[e4a5635]34 <seg>&perl-ch6-sbu;</seg>
35 <seg>&perl-ch6-du;</seg>
[3f3931b0]36 </seglistitem>
37 </segmentedlist>
[3554fa3a]38
[3f3931b0]39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of Perl</title>
43
[d26d6d5]44 <para>First create a basic <filename>/etc/hosts</filename> file to be
45 referenced in one of Perl's configuration files as well as the optional
[0ebe029b]46 test suite:</para>
[f76cde8]47
[0445a3d]48<screen><userinput remap="pre">echo "127.0.0.1 localhost $(hostname)" &gt; /etc/hosts</userinput></screen>
[f76cde8]49
[24b4230]50 <para>Apply a patch to fix a security vulnerability in Perl:</para>
51
52<screen><userinput remap="pre">patch -Np1 -i ../&perl-security-patch;</userinput></screen>
53
[59af1dc]54 <para>This version of Perl now builds the Compress::Raw::Zlib module. By
55 default Perl will use an internal copy of the Zlib source for the build.
56 Issue the following command so that Perl will use the Zlib library
57 installed on the system:</para>
58
59<screen><userinput remap="pre">sed -i -e "s|BUILD_ZLIB\s*= True|BUILD_ZLIB = False|" \
60 -e "s|INCLUDE\s*= ./zlib-src|INCLUDE = /usr/include|" \
61 -e "s|LIB\s*= ./zlib-src|LIB = /usr/lib|" \
[ec52ebb]62 cpan/Compress-Raw-Zlib/config.in</userinput></screen>
[b0a4c9a]63
[894367e]64 <para>To have full control over the way Perl is set up, you can remove the
65 <quote>-des</quote> options from the following command and hand-pick the way
[b4a1c5e]66 this package is built. Alternatively, use the command exactly as below to
[894367e]67 use the defaults that Perl auto-detects:</para>
[73aedd1d]68
[9f5aaf7]69<screen><userinput remap="configure">sh Configure -des -Dprefix=/usr \
[863beea]70 -Dvendorprefix=/usr \
71 -Dman1dir=/usr/share/man/man1 \
72 -Dman3dir=/usr/share/man/man3 \
[b0e583b]73 -Dpager="/usr/bin/less -isR" \
74 -Duseshrplib</userinput></screen>
[73aedd1d]75
[3f3931b0]76 <variablelist>
77 <title>The meaning of the configure options:</title>
[81fd230]78
[863beea]79 <varlistentry>
80 <term><parameter>-Dvendorprefix=/usr</parameter></term>
81 <listitem>
82 <para>This ensures <command>perl</command> knows how to
83 tell packages where they should install their perl modules.</para>
84 </listitem>
85 </varlistentry>
86
[3f3931b0]87 <varlistentry>
88 <term><parameter>-Dpager="/usr/bin/less -isR"</parameter></term>
89 <listitem>
90 <para>This corrects an error in the way that <command>perldoc</command>
91 invokes the <command>less</command> program.</para>
92 </listitem>
93 </varlistentry>
[81fd230]94
[3685bb6]95 <varlistentry>
96 <term><parameter>-Dman1dir=/usr/share/man/man1
97 -Dman3dir=/usr/share/man/man3</parameter></term>
98 <listitem>
99 <para>Since Groff is not installed yet, <command>Configure</command>
100 thinks that we do not want man pages for Perl. Issuing these
101 parameters overrides this decision.</para>
102 </listitem>
103 </varlistentry>
104
[b0e583b]105 <varlistentry>
106 <term><parameter>-Duseshrplib</parameter></term>
107 <listitem>
108 <para>Build a shared libperl needed by some perl modules.</para>
109 </listitem>
110 </varlistentry>
111
[3f3931b0]112 </variablelist>
113
114 <para>Compile the package:</para>
[73aedd1d]115
[0445a3d]116<screen><userinput remap="make">make</userinput></screen>
[73aedd1d]117
[080e8f8]118 <para>To test the results (approximately 2.5 SBU), issue:</para>
[0445a3d]119
[59af1dc]120<screen><userinput remap="test">make test</userinput></screen>
[73aedd1d]121
[3f3931b0]122 <para>Install the package:</para>
[73aedd1d]123
[0445a3d]124<screen><userinput remap="install">make install</userinput></screen>
[73aedd1d]125
[3f3931b0]126 </sect2>
127
128 <sect2 id="contents-perl" role="content">
129 <title>Contents of Perl</title>
130
131 <segmentedlist>
132 <segtitle>Installed programs</segtitle>
133 <segtitle>Installed libraries</segtitle>
[fe05b08]134 <segtitle>Installed directory</segtitle>
[3f3931b0]135
136 <seglistitem>
[90aae6b]137 <seg>a2p, c2ph, config_data, corelist, cpan, cpan2dist, cpanp,
138 cpanp-run-perl, dprofpp, enc2xs, find2perl, h2ph, h2xs,
[3119ddc]139 instmodsh, json_pp, libnetcfg, perl, perl&perl-version; (link to perl),
[9d42ad9]140 perlbug, perldoc, perlivp, perlthanks (link to perlbug), piconv, pl2pm,
141 pod2html, pod2latex, pod2man, pod2text, pod2usage, podchecker,
142 podselect, prove, psed (link to s2p), pstruct (link to c2ph), ptar,
[3119ddc]143 ptardiff, ptargrep, s2p, shasum, splain, and xsubpp</seg>
[3f3931b0]144 <seg>Several hundred which cannot all be listed here</seg>
[fe05b08]145 <seg>/usr/lib/perl5</seg>
[3f3931b0]146 </seglistitem>
147 </segmentedlist>
148
149 <variablelist>
150 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
151 <?dbfo list-presentation="list"?>
152 <?dbhtml list-presentation="table"?>
153
154 <varlistentry id="a2p">
155 <term><command>a2p</command></term>
156 <listitem>
157 <para>Translates awk to Perl</para>
158 <indexterm zone="ch-system-perl a2p">
159 <primary sortas="b-a2p">a2p</primary>
160 </indexterm>
161 </listitem>
162 </varlistentry>
163
164 <varlistentry id="c2ph">
165 <term><command>c2ph</command></term>
166 <listitem>
167 <para>Dumps C structures as generated from
168 <command>cc -g -S</command></para>
169 <indexterm zone="ch-system-perl c2ph">
170 <primary sortas="b-c2ph">c2ph</primary>
171 </indexterm>
172 </listitem>
173 </varlistentry>
174
[90aae6b]175 <varlistentry id="config_data">
176 <term><command>config_data</command></term>
177 <listitem>
178 <para>Queries or changes configuration of Perl modules</para>
179 <indexterm zone="ch-system-perl config_data">
180 <primary sortas="b-config_data">config_data</primary>
181 </indexterm>
182 </listitem>
183 </varlistentry>
184
185 <varlistentry id="corelist">
186 <term><command>corelist</command></term>
187 <listitem>
188 <para>A commandline frontend to Module::CoreList</para>
189 <indexterm zone="ch-system-perl corelist">
190 <primary sortas="b-corelist">corelist</primary>
191 </indexterm>
192 </listitem>
193 </varlistentry>
194
[3ee0c39]195 <varlistentry id="cpan">
196 <term><command>cpan</command></term>
197 <listitem>
198 <para>Interact with the Comprehensive Perl Archive Network (CPAN)
199 from the command line</para>
200 <indexterm zone="ch-system-perl cpan">
201 <primary sortas="b-cpan">cpan</primary>
202 </indexterm>
203 </listitem>
204 </varlistentry>
205
[90aae6b]206 <varlistentry id="cpan2dist">
207 <term><command>cpan2dist</command></term>
208 <listitem>
209 <para>The CPANPLUS distribution creator</para>
210 <indexterm zone="ch-system-perl cpan2dist">
211 <primary sortas="b-cpan2dist">cpan2dist</primary>
212 </indexterm>
213 </listitem>
214 </varlistentry>
215
216 <varlistentry id="cpanp">
217 <term><command>cpanp</command></term>
218 <listitem>
219 <para>The CPANPLUS launcher</para>
220 <indexterm zone="ch-system-perl cpanp">
221 <primary sortas="b-cpanp">cpanp</primary>
222 </indexterm>
223 </listitem>
224 </varlistentry>
225
226 <varlistentry id="cpanp-run-perl">
227 <term><command>cpanp-run-perl</command></term>
228 <listitem>
[a35b70f]229 <para>Perl script that is used to enable flushing of the output
[dab9dfe]230 buffer after each write in spawned processes</para>
[90aae6b]231 <indexterm zone="ch-system-perl cpanp-run-perl">
232 <primary sortas="b-cpanp-run-perl">cpanp-run-perl</primary>
233 </indexterm>
234 </listitem>
235 </varlistentry>
236
[3f3931b0]237 <varlistentry id="dprofpp">
238 <term><command>dprofpp</command></term>
239 <listitem>
240 <para>Displays Perl profile data</para>
241 <indexterm zone="ch-system-perl dprofpp">
242 <primary sortas="b-dprofpp">dprofpp</primary>
243 </indexterm>
244 </listitem>
245 </varlistentry>
246
[8bc46a5]247 <varlistentry id="enc2xs">
248 <term><command>enc2xs</command></term>
[3f3931b0]249 <listitem>
250 <para>Builds a Perl extension for the Encode module from either
251 Unicode Character Mappings or Tcl Encoding Files</para>
[8bc46a5]252 <indexterm zone="ch-system-perl enc2xs">
253 <primary sortas="b-enc2xs">enc2xs</primary>
[3f3931b0]254 </indexterm>
255 </listitem>
256 </varlistentry>
257
258 <varlistentry id="find2perl">
259 <term><command>find2perl</command></term>
260 <listitem>
261 <para>Translates <command>find</command> commands to Perl</para>
262 <indexterm zone="ch-system-perl find2perl">
263 <primary sortas="b-find2perl">find2perl</primary>
264 </indexterm>
265 </listitem>
266 </varlistentry>
267
268 <varlistentry id="h2ph">
269 <term><command>h2ph</command></term>
270 <listitem>
271 <para>Converts <filename class="extension">.h</filename> C header
272 files to <filename class="extension">.ph</filename> Perl header
273 files</para>
274 <indexterm zone="ch-system-perl h2ph">
275 <primary sortas="b-h2ph">h2ph</primary>
276 </indexterm>
277 </listitem>
278 </varlistentry>
279
280 <varlistentry id="h2xs">
281 <term><command>h2xs</command></term>
282 <listitem>
283 <para>Converts <filename class="extension">.h</filename> C header
284 files to Perl extensions</para>
285 <indexterm zone="ch-system-perl h2xs">
286 <primary sortas="b-h2xs">h2xs</primary>
287 </indexterm>
288 </listitem>
289 </varlistentry>
290
[8bc46a5]291 <varlistentry id="instmodsh">
292 <term><command>instmodsh</command></term>
293 <listitem>
294 <para>Shell script for examining installed Perl modules,
295 and can even create a tarball from an installed module</para>
296 <indexterm zone="ch-system-perl instmodsh">
297 <primary sortas="b-instmodsh">instmodsh</primary>
298 </indexterm>
299 </listitem>
300 </varlistentry>
301
[3119ddc]302 <varlistentry id="json_pp">
303 <term><command>json_pp</command></term>
304 <listitem>
305 <para>Converts data between certain input and output formats</para>
306 <indexterm zone="ch-system-perl json_pp">
307 <primary sortas="b-json_pp">json_pp</primary>
308 </indexterm>
309 </listitem>
310 </varlistentry>
311
[3f3931b0]312 <varlistentry id="libnetcfg">
313 <term><command>libnetcfg</command></term>
314 <listitem>
315 <para>Can be used to configure the
[1db98e19]316 <filename class="libraryfile">libnet</filename> Perl module</para>
[3f3931b0]317 <indexterm zone="ch-system-perl libnetcfg">
318 <primary sortas="b-libnetcfg">libnetcfg</primary>
319 </indexterm>
320 </listitem>
321 </varlistentry>
322
323 <varlistentry id="perl">
324 <term><command>perl</command></term>
325 <listitem>
326 <para>Combines some of the best features of C, <command>sed</command>,
327 <command>awk</command> and <command>sh</command> into a single
328 swiss-army language</para>
329 <indexterm zone="ch-system-perl perl">
330 <primary sortas="b-perl">perl</primary>
331 </indexterm>
332 </listitem>
333 </varlistentry>
334
335 <varlistentry id="perl-version">
336 <term><command>perl&perl-version;</command></term>
337 <listitem>
338 <para>A hard link to <command>perl</command></para>
339 <indexterm zone="ch-system-perl perl-version">
340 <primary sortas="b-perl&perl-version;">perl&perl-version;</primary>
341 </indexterm>
342 </listitem>
343 </varlistentry>
344
345 <varlistentry id="perlbug">
346 <term><command>perlbug</command></term>
347 <listitem>
348 <para>Used to generate bug reports about Perl, or the modules that come
349 with it, and mail them</para>
350 <indexterm zone="ch-system-perl perlbug">
351 <primary sortas="b-perlbug">perlbug</primary>
352 </indexterm>
353 </listitem>
354 </varlistentry>
355
356 <varlistentry id="perldoc">
357 <term><command>perldoc</command></term>
358 <listitem>
359 <para>Displays a piece of documentation in pod format that is embedded
360 in the Perl installation tree or in a Perl script</para>
361 <indexterm zone="ch-system-perl perldoc">
362 <primary sortas="b-perldoc">perldoc</primary>
363 </indexterm>
364 </listitem>
365 </varlistentry>
366
367 <varlistentry id="perlivp">
368 <term><command>perlivp</command></term>
369 <listitem>
370 <para>The Perl Installation Verification Procedure; it can be used to
371 verify that Perl and its libraries have been installed
372 correctly</para>
373 <indexterm zone="ch-system-perl perlivp">
374 <primary sortas="b-perlivp">perlivp</primary>
375 </indexterm>
376 </listitem>
377 </varlistentry>
378
[9d42ad9]379 <varlistentry id="perlthanks">
380 <term><command>perlthanks</command></term>
381 <listitem>
382 <para>Used to generate thank you messages to mail to the Perl
383 developers</para>
384 <indexterm zone="ch-system-perl perlthanks">
385 <primary sortas="b-perlthanks">perlthanks</primary>
386 </indexterm>
387 </listitem>
388 </varlistentry>
389
[3f3931b0]390 <varlistentry id="piconv">
391 <term><command>piconv</command></term>
392 <listitem>
393 <para>A Perl version of the character encoding converter
394 <command>iconv</command></para>
395 <indexterm zone="ch-system-perl piconv">
396 <primary sortas="b-piconv">piconv</primary>
397 </indexterm>
398 </listitem>
399 </varlistentry>
400
401 <varlistentry id="pl2pm">
402 <term><command>pl2pm</command></term>
403 <listitem>
404 <para>A rough tool for converting Perl4
405 <filename class="extension">.pl</filename> files to Perl5
406 <filename class="extension">.pm</filename> modules</para>
407 <indexterm zone="ch-system-perl pl2pm">
408 <primary sortas="b-pl2pm">pl2pm</primary>
409 </indexterm>
410 </listitem>
411 </varlistentry>
412
413 <varlistentry id="pod2html">
414 <term><command>pod2html</command></term>
415 <listitem>
416 <para>Converts files from pod format to HTML format</para>
417 <indexterm zone="ch-system-perl pod2html">
418 <primary sortas="b-pod2html">pod2html</primary>
419 </indexterm>
420 </listitem>
421 </varlistentry>
422
423 <varlistentry id="pod2latex">
424 <term><command>pod2latex</command></term>
425 <listitem>
426 <para>Converts files from pod format to LaTeX format</para>
427 <indexterm zone="ch-system-perl pod2latex">
428 <primary sortas="b-pod2latex">pod2latex</primary>
429 </indexterm>
430 </listitem>
431 </varlistentry>
432
433 <varlistentry id="pod2man">
434 <term><command>pod2man</command></term>
435 <listitem>
436 <para>Converts pod data to formatted *roff input</para>
437 <indexterm zone="ch-system-perl pod2man">
438 <primary sortas="b-pod2man">pod2man</primary>
439 </indexterm>
440 </listitem>
441 </varlistentry>
442
443 <varlistentry id="pod2text">
444 <term><command>pod2text</command></term>
445 <listitem>
446 <para>Converts pod data to formatted ASCII text</para>
447 <indexterm zone="ch-system-perl pod2text">
448 <primary sortas="b-pod2text">pod2text</primary>
449 </indexterm>
450 </listitem>
451 </varlistentry>
452
453 <varlistentry id="pod2usage">
454 <term><command>pod2usage</command></term>
455 <listitem>
456 <para>Prints usage messages from embedded pod docs in files</para>
457 <indexterm zone="ch-system-perl pod2usage">
458 <primary sortas="b-pod2usage">pod2usage</primary>
459 </indexterm>
460 </listitem>
461 </varlistentry>
462
463 <varlistentry id="podchecker">
464 <term><command>podchecker</command></term>
465 <listitem>
466 <para>Checks the syntax of pod format documentation files</para>
467 <indexterm zone="ch-system-perl podchecker">
468 <primary sortas="b-podchecker">podchecker</primary>
469 </indexterm>
470 </listitem>
471 </varlistentry>
472
473 <varlistentry id="podselect">
474 <term><command>podselect</command></term>
475 <listitem>
476 <para>Displays selected sections of pod documentation</para>
477 <indexterm zone="ch-system-perl podselect">
478 <primary sortas="b-podselect">podselect</primary>
479 </indexterm>
480 </listitem>
481 </varlistentry>
482
[3ee0c39]483 <varlistentry id="prove">
484 <term><command>prove</command></term>
485 <listitem>
486 <para>Command line tool for running tests against the Test::Harness
487 module.</para>
488 <indexterm zone="ch-system-perl prove">
489 <primary sortas="b-prove">prove</primary>
490 </indexterm>
491 </listitem>
492 </varlistentry>
493
[3f3931b0]494 <varlistentry id="psed">
495 <term><command>psed</command></term>
496 <listitem>
497 <para>A Perl version of the stream editor <command>sed</command></para>
498 <indexterm zone="ch-system-perl psed">
499 <primary sortas="b-psed">psed</primary>
500 </indexterm>
501 </listitem>
502 </varlistentry>
503
504 <varlistentry id="pstruct">
505 <term><command>pstruct</command></term>
506 <listitem>
507 <para>Dumps C structures as generated from <command>cc -g -S</command>
508 stabs</para>
509 <indexterm zone="ch-system-perl pstruct">
510 <primary sortas="b-pstruct">pstruct</primary>
511 </indexterm>
512 </listitem>
513 </varlistentry>
514
[90aae6b]515 <varlistentry id="ptar">
516 <term><command>ptar</command></term>
517 <listitem>
518 <para>A <command>tar</command>-like program written in Perl</para>
519 <indexterm zone="ch-system-perl ptar">
520 <primary sortas="b-ptar">ptar</primary>
521 </indexterm>
522 </listitem>
523 </varlistentry>
524
525 <varlistentry id="ptardiff">
526 <term><command>ptardiff</command></term>
527 <listitem>
528 <para>A Perl program that compares an extracted archive with an
529 unextracted one</para>
530 <indexterm zone="ch-system-perl ptardiff">
531 <primary sortas="b-ptardiff">ptardiff</primary>
532 </indexterm>
533 </listitem>
534 </varlistentry>
535
[3119ddc]536 <varlistentry id="ptargrep">
537 <term><command>ptargrep</command></term>
538 <listitem>
539 <para>A Perl program that applies pattern matching to the contents
540 of files in a tar archive</para>
541 <indexterm zone="ch-system-perl ptargrep">
542 <primary sortas="b-ptargrep">ptargrep</primary>
543 </indexterm>
544 </listitem>
545 </varlistentry>
546
[3f3931b0]547 <varlistentry id="s2p">
548 <term><command>s2p</command></term>
549 <listitem>
550 <para>Translates <command>sed</command> scripts to Perl</para>
551 <indexterm zone="ch-system-perl s2p">
552 <primary sortas="b-s2p">s2p</primary>
553 </indexterm>
554 </listitem>
555 </varlistentry>
556
[90aae6b]557 <varlistentry id="shasum">
558 <term><command>shasum</command></term>
559 <listitem>
560 <para>Prints or checks SHA checksums</para>
561 <indexterm zone="ch-system-perl shasum">
562 <primary sortas="b-shasum">shasum</primary>
563 </indexterm>
564 </listitem>
565 </varlistentry>
566
[3f3931b0]567 <varlistentry id="splain">
568 <term><command>splain</command></term>
569 <listitem>
570 <para>Is used to force verbose warning diagnostics in Perl</para>
571 <indexterm zone="ch-system-perl splain">
572 <primary sortas="b-splain">splain</primary>
573 </indexterm>
574 </listitem>
575 </varlistentry>
576
577 <varlistentry id="xsubpp">
578 <term><command>xsubpp</command></term>
579 <listitem>
580 <para>Converts Perl XS code into C code</para>
581 <indexterm zone="ch-system-perl xsubpp">
582 <primary sortas="b-xsubpp">xsubpp</primary>
583 </indexterm>
584 </listitem>
585 </varlistentry>
586
587 </variablelist>
588
589 </sect2>
[673b0d8]590
591</sect1>
Note: See TracBrowser for help on using the repository browser.