source: chapter06/perl.xml@ a139c25

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.6 7.7 7.8 7.9 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 a139c25 was a139c25, checked in by Bruce Dubbs <bdubbs@…>, 10 years ago

Update rationale for programs needed by systemd.
Reword an explanation for specifying less for the perl pager.

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

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