source: chapter06/perl.xml@ d53fefa

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 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 d53fefa was a0d8086, checked in by Xi Ruoyao <xry111@…>, 4 years ago

perl: no tests fail now

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

  • Property mode set to 100644
File size: 17.8 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
[7e7daa79]50 <para>This version of Perl now builds the Compress::Raw::Zlib and
[78bf0c1]51 Compress::Raw::BZip2 modules. By
52 default Perl will use an internal copy of the sources for the build.
53 Issue the following command so that Perl will use the libraries
[59af1dc]54 installed on the system:</para>
55
[78bf0c1]56<screen><userinput remap="pre">export BUILD_ZLIB=False
57export BUILD_BZIP2=0</userinput></screen>
[241831ed]58<!--
[bb189b0]59 <para>Apply a patch to allow the Errno.pm module and the h2ph
60 program to build correctly when building with GCC 5:</para>
61
62<screen><userinput remap="pre">patch -Np1 -i ../&perl-gcc5-fixes-patch;</userinput></screen>
[241831ed]63-->
[5d276d1]64
[894367e]65 <para>To have full control over the way Perl is set up, you can remove the
66 <quote>-des</quote> options from the following command and hand-pick the way
[b4a1c5e]67 this package is built. Alternatively, use the command exactly as below to
[894367e]68 use the defaults that Perl auto-detects:</para>
[73aedd1d]69
[9f5aaf7]70<screen><userinput remap="configure">sh Configure -des -Dprefix=/usr \
[863beea]71 -Dvendorprefix=/usr \
72 -Dman1dir=/usr/share/man/man1 \
73 -Dman3dir=/usr/share/man/man3 \
[b0e583b]74 -Dpager="/usr/bin/less -isR" \
[1e472fb]75 -Duseshrplib \
76 -Dusethreads</userinput></screen>
[73aedd1d]77
[3f3931b0]78 <variablelist>
79 <title>The meaning of the configure options:</title>
[81fd230]80
[863beea]81 <varlistentry>
82 <term><parameter>-Dvendorprefix=/usr</parameter></term>
83 <listitem>
84 <para>This ensures <command>perl</command> knows how to
85 tell packages where they should install their perl modules.</para>
86 </listitem>
87 </varlistentry>
88
[3f3931b0]89 <varlistentry>
90 <term><parameter>-Dpager="/usr/bin/less -isR"</parameter></term>
91 <listitem>
[a139c25]92 <para>This ensures that <userinput>less</userinput> is used instead
93 of <userinput>more</userinput>.</para>
[3f3931b0]94 </listitem>
95 </varlistentry>
[81fd230]96
[3685bb6]97 <varlistentry>
98 <term><parameter>-Dman1dir=/usr/share/man/man1
99 -Dman3dir=/usr/share/man/man3</parameter></term>
100 <listitem>
101 <para>Since Groff is not installed yet, <command>Configure</command>
102 thinks that we do not want man pages for Perl. Issuing these
103 parameters overrides this decision.</para>
104 </listitem>
105 </varlistentry>
106
[b0e583b]107 <varlistentry>
108 <term><parameter>-Duseshrplib</parameter></term>
109 <listitem>
110 <para>Build a shared libperl needed by some perl modules.</para>
111 </listitem>
112 </varlistentry>
113
[1e472fb]114 <varlistentry>
115 <term><parameter>-Dusethreads</parameter></term>
116 <listitem>
117 <para>Build perl with support for threads.</para>
118 </listitem>
119 </varlistentry>
120
[3f3931b0]121 </variablelist>
122
123 <para>Compile the package:</para>
[73aedd1d]124
[0445a3d]125<screen><userinput remap="make">make</userinput></screen>
[73aedd1d]126
[ff321d9]127 <para>To test the results (approximately 11 SBU), issue:</para>
[0445a3d]128
[a0d8086]129<screen><userinput remap="test">make test</userinput></screen>
[73aedd1d]130
[a0d8086]131 <!--note><para>One test fails due to using the most recent version of gdbm.
132 </para></note-->
[9a605b8]133
[78bf0c1]134 <para>Install the package and clean up:</para>
[73aedd1d]135
[78bf0c1]136<screen><userinput remap="install">make install
137unset BUILD_ZLIB BUILD_BZIP2</userinput></screen>
[73aedd1d]138
[3f3931b0]139 </sect2>
140
141 <sect2 id="contents-perl" role="content">
142 <title>Contents of Perl</title>
143
144 <segmentedlist>
145 <segtitle>Installed programs</segtitle>
146 <segtitle>Installed libraries</segtitle>
[fe05b08]147 <segtitle>Installed directory</segtitle>
[3f3931b0]148
149 <seglistitem>
[8146d97]150 <seg>corelist, cpan, enc2xs, encguess, h2ph, h2xs, instmodsh,
[040ecb6]151 json_pp, libnetcfg, perl, perl&perl-version; (hard link to perl),
152 perlbug, perldoc, perlivp, perlthanks (hard link to perlbug), piconv,
153 pl2pm, pod2html, pod2man, pod2text, pod2usage, podchecker, podselect,
[8146d97]154 prove, ptar, ptardiff, ptargrep, shasum,
[040ecb6]155 splain, xsubpp, and zipdetails</seg>
156 <seg>Many which cannot all be listed here</seg>
[fe05b08]157 <seg>/usr/lib/perl5</seg>
[3f3931b0]158 </seglistitem>
159 </segmentedlist>
160
161 <variablelist>
162 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
163 <?dbfo list-presentation="list"?>
164 <?dbhtml list-presentation="table"?>
[8146d97]165<!--
[3f3931b0]166 <varlistentry id="c2ph">
167 <term><command>c2ph</command></term>
168 <listitem>
169 <para>Dumps C structures as generated from
170 <command>cc -g -S</command></para>
171 <indexterm zone="ch-system-perl c2ph">
172 <primary sortas="b-c2ph">c2ph</primary>
173 </indexterm>
174 </listitem>
175 </varlistentry>
[8146d97]176-->
[90aae6b]177 <varlistentry id="corelist">
178 <term><command>corelist</command></term>
179 <listitem>
180 <para>A commandline frontend to Module::CoreList</para>
181 <indexterm zone="ch-system-perl corelist">
182 <primary sortas="b-corelist">corelist</primary>
183 </indexterm>
184 </listitem>
185 </varlistentry>
186
[3ee0c39]187 <varlistentry id="cpan">
188 <term><command>cpan</command></term>
189 <listitem>
190 <para>Interact with the Comprehensive Perl Archive Network (CPAN)
191 from the command line</para>
192 <indexterm zone="ch-system-perl cpan">
193 <primary sortas="b-cpan">cpan</primary>
194 </indexterm>
195 </listitem>
196 </varlistentry>
197
[8bc46a5]198 <varlistentry id="enc2xs">
199 <term><command>enc2xs</command></term>
[3f3931b0]200 <listitem>
201 <para>Builds a Perl extension for the Encode module from either
202 Unicode Character Mappings or Tcl Encoding Files</para>
[8bc46a5]203 <indexterm zone="ch-system-perl enc2xs">
204 <primary sortas="b-enc2xs">enc2xs</primary>
[3f3931b0]205 </indexterm>
206 </listitem>
207 </varlistentry>
208
[040ecb6]209 <varlistentry id="encguess">
210 <term><command>encguess</command></term>
211 <listitem>
212 <para>Guess the encoding type of one or several files</para>
213 <indexterm zone="ch-system-perl encguess">
214 <primary sortas="b-encguess">encguess</primary>
215 </indexterm>
216 </listitem>
217 </varlistentry>
218
[3f3931b0]219 <varlistentry id="h2ph">
220 <term><command>h2ph</command></term>
221 <listitem>
222 <para>Converts <filename class="extension">.h</filename> C header
223 files to <filename class="extension">.ph</filename> Perl header
224 files</para>
225 <indexterm zone="ch-system-perl h2ph">
226 <primary sortas="b-h2ph">h2ph</primary>
227 </indexterm>
228 </listitem>
229 </varlistentry>
230
231 <varlistentry id="h2xs">
232 <term><command>h2xs</command></term>
233 <listitem>
234 <para>Converts <filename class="extension">.h</filename> C header
235 files to Perl extensions</para>
236 <indexterm zone="ch-system-perl h2xs">
237 <primary sortas="b-h2xs">h2xs</primary>
238 </indexterm>
239 </listitem>
240 </varlistentry>
241
[8bc46a5]242 <varlistentry id="instmodsh">
243 <term><command>instmodsh</command></term>
244 <listitem>
245 <para>Shell script for examining installed Perl modules,
[0d84af1]246 and can create a tarball from an installed module</para>
[8bc46a5]247 <indexterm zone="ch-system-perl instmodsh">
248 <primary sortas="b-instmodsh">instmodsh</primary>
249 </indexterm>
250 </listitem>
251 </varlistentry>
252
[3119ddc]253 <varlistentry id="json_pp">
254 <term><command>json_pp</command></term>
255 <listitem>
256 <para>Converts data between certain input and output formats</para>
257 <indexterm zone="ch-system-perl json_pp">
258 <primary sortas="b-json_pp">json_pp</primary>
259 </indexterm>
260 </listitem>
261 </varlistentry>
262
[3f3931b0]263 <varlistentry id="libnetcfg">
264 <term><command>libnetcfg</command></term>
265 <listitem>
266 <para>Can be used to configure the
[1db98e19]267 <filename class="libraryfile">libnet</filename> Perl module</para>
[3f3931b0]268 <indexterm zone="ch-system-perl libnetcfg">
269 <primary sortas="b-libnetcfg">libnetcfg</primary>
270 </indexterm>
271 </listitem>
272 </varlistentry>
273
274 <varlistentry id="perl">
275 <term><command>perl</command></term>
276 <listitem>
277 <para>Combines some of the best features of C, <command>sed</command>,
278 <command>awk</command> and <command>sh</command> into a single
279 swiss-army language</para>
280 <indexterm zone="ch-system-perl perl">
281 <primary sortas="b-perl">perl</primary>
282 </indexterm>
283 </listitem>
284 </varlistentry>
285
286 <varlistentry id="perl-version">
287 <term><command>perl&perl-version;</command></term>
288 <listitem>
289 <para>A hard link to <command>perl</command></para>
290 <indexterm zone="ch-system-perl perl-version">
291 <primary sortas="b-perl&perl-version;">perl&perl-version;</primary>
292 </indexterm>
293 </listitem>
294 </varlistentry>
295
296 <varlistentry id="perlbug">
297 <term><command>perlbug</command></term>
298 <listitem>
299 <para>Used to generate bug reports about Perl, or the modules that come
300 with it, and mail them</para>
301 <indexterm zone="ch-system-perl perlbug">
302 <primary sortas="b-perlbug">perlbug</primary>
303 </indexterm>
304 </listitem>
305 </varlistentry>
306
307 <varlistentry id="perldoc">
308 <term><command>perldoc</command></term>
309 <listitem>
310 <para>Displays a piece of documentation in pod format that is embedded
311 in the Perl installation tree or in a Perl script</para>
312 <indexterm zone="ch-system-perl perldoc">
313 <primary sortas="b-perldoc">perldoc</primary>
314 </indexterm>
315 </listitem>
316 </varlistentry>
317
318 <varlistentry id="perlivp">
319 <term><command>perlivp</command></term>
320 <listitem>
321 <para>The Perl Installation Verification Procedure; it can be used to
322 verify that Perl and its libraries have been installed
323 correctly</para>
324 <indexterm zone="ch-system-perl perlivp">
325 <primary sortas="b-perlivp">perlivp</primary>
326 </indexterm>
327 </listitem>
328 </varlistentry>
329
[9d42ad9]330 <varlistentry id="perlthanks">
331 <term><command>perlthanks</command></term>
332 <listitem>
333 <para>Used to generate thank you messages to mail to the Perl
334 developers</para>
335 <indexterm zone="ch-system-perl perlthanks">
336 <primary sortas="b-perlthanks">perlthanks</primary>
337 </indexterm>
338 </listitem>
339 </varlistentry>
340
[3f3931b0]341 <varlistentry id="piconv">
342 <term><command>piconv</command></term>
343 <listitem>
344 <para>A Perl version of the character encoding converter
345 <command>iconv</command></para>
346 <indexterm zone="ch-system-perl piconv">
347 <primary sortas="b-piconv">piconv</primary>
348 </indexterm>
349 </listitem>
350 </varlistentry>
351
352 <varlistentry id="pl2pm">
353 <term><command>pl2pm</command></term>
354 <listitem>
355 <para>A rough tool for converting Perl4
356 <filename class="extension">.pl</filename> files to Perl5
357 <filename class="extension">.pm</filename> modules</para>
358 <indexterm zone="ch-system-perl pl2pm">
359 <primary sortas="b-pl2pm">pl2pm</primary>
360 </indexterm>
361 </listitem>
362 </varlistentry>
363
364 <varlistentry id="pod2html">
365 <term><command>pod2html</command></term>
366 <listitem>
367 <para>Converts files from pod format to HTML format</para>
368 <indexterm zone="ch-system-perl pod2html">
369 <primary sortas="b-pod2html">pod2html</primary>
370 </indexterm>
371 </listitem>
372 </varlistentry>
373
374 <varlistentry id="pod2man">
375 <term><command>pod2man</command></term>
376 <listitem>
377 <para>Converts pod data to formatted *roff input</para>
378 <indexterm zone="ch-system-perl pod2man">
379 <primary sortas="b-pod2man">pod2man</primary>
380 </indexterm>
381 </listitem>
382 </varlistentry>
383
384 <varlistentry id="pod2text">
385 <term><command>pod2text</command></term>
386 <listitem>
387 <para>Converts pod data to formatted ASCII text</para>
388 <indexterm zone="ch-system-perl pod2text">
389 <primary sortas="b-pod2text">pod2text</primary>
390 </indexterm>
391 </listitem>
392 </varlistentry>
393
394 <varlistentry id="pod2usage">
395 <term><command>pod2usage</command></term>
396 <listitem>
397 <para>Prints usage messages from embedded pod docs in files</para>
398 <indexterm zone="ch-system-perl pod2usage">
399 <primary sortas="b-pod2usage">pod2usage</primary>
400 </indexterm>
401 </listitem>
402 </varlistentry>
403
404 <varlistentry id="podchecker">
405 <term><command>podchecker</command></term>
406 <listitem>
407 <para>Checks the syntax of pod format documentation files</para>
408 <indexterm zone="ch-system-perl podchecker">
409 <primary sortas="b-podchecker">podchecker</primary>
410 </indexterm>
411 </listitem>
412 </varlistentry>
413
414 <varlistentry id="podselect">
415 <term><command>podselect</command></term>
416 <listitem>
417 <para>Displays selected sections of pod documentation</para>
418 <indexterm zone="ch-system-perl podselect">
419 <primary sortas="b-podselect">podselect</primary>
420 </indexterm>
421 </listitem>
422 </varlistentry>
423
[3ee0c39]424 <varlistentry id="prove">
425 <term><command>prove</command></term>
426 <listitem>
427 <para>Command line tool for running tests against the Test::Harness
[afba93b]428 module</para>
[3ee0c39]429 <indexterm zone="ch-system-perl prove">
430 <primary sortas="b-prove">prove</primary>
431 </indexterm>
432 </listitem>
433 </varlistentry>
[8146d97]434<!--
[3f3931b0]435 <varlistentry id="pstruct">
436 <term><command>pstruct</command></term>
437 <listitem>
438 <para>Dumps C structures as generated from <command>cc -g -S</command>
439 stabs</para>
440 <indexterm zone="ch-system-perl pstruct">
441 <primary sortas="b-pstruct">pstruct</primary>
442 </indexterm>
443 </listitem>
444 </varlistentry>
[8146d97]445-->
[90aae6b]446 <varlistentry id="ptar">
447 <term><command>ptar</command></term>
448 <listitem>
449 <para>A <command>tar</command>-like program written in Perl</para>
450 <indexterm zone="ch-system-perl ptar">
451 <primary sortas="b-ptar">ptar</primary>
452 </indexterm>
453 </listitem>
454 </varlistentry>
455
456 <varlistentry id="ptardiff">
457 <term><command>ptardiff</command></term>
458 <listitem>
459 <para>A Perl program that compares an extracted archive with an
460 unextracted one</para>
461 <indexterm zone="ch-system-perl ptardiff">
462 <primary sortas="b-ptardiff">ptardiff</primary>
463 </indexterm>
464 </listitem>
465 </varlistentry>
466
[3119ddc]467 <varlistentry id="ptargrep">
468 <term><command>ptargrep</command></term>
469 <listitem>
470 <para>A Perl program that applies pattern matching to the contents
471 of files in a tar archive</para>
472 <indexterm zone="ch-system-perl ptargrep">
473 <primary sortas="b-ptargrep">ptargrep</primary>
474 </indexterm>
475 </listitem>
476 </varlistentry>
477
[90aae6b]478 <varlistentry id="shasum">
479 <term><command>shasum</command></term>
480 <listitem>
481 <para>Prints or checks SHA checksums</para>
482 <indexterm zone="ch-system-perl shasum">
483 <primary sortas="b-shasum">shasum</primary>
484 </indexterm>
485 </listitem>
486 </varlistentry>
487
[3f3931b0]488 <varlistentry id="splain">
489 <term><command>splain</command></term>
490 <listitem>
491 <para>Is used to force verbose warning diagnostics in Perl</para>
492 <indexterm zone="ch-system-perl splain">
493 <primary sortas="b-splain">splain</primary>
494 </indexterm>
495 </listitem>
496 </varlistentry>
497
498 <varlistentry id="xsubpp">
499 <term><command>xsubpp</command></term>
500 <listitem>
501 <para>Converts Perl XS code into C code</para>
502 <indexterm zone="ch-system-perl xsubpp">
503 <primary sortas="b-xsubpp">xsubpp</primary>
504 </indexterm>
505 </listitem>
506 </varlistentry>
507
[ca101ad]508 <varlistentry id="zipdetails">
509 <term><command>zipdetails</command></term>
510 <listitem>
511 <para>Displays details about the internal structure of a Zip file</para>
512 <indexterm zone="ch-system-perl zipdetails">
513 <primary sortas="b-zipdetails">zipdetails</primary>
514 </indexterm>
515 </listitem>
516 </varlistentry>
517
[3f3931b0]518 </variablelist>
519
520 </sect2>
[673b0d8]521
522</sect1>
Note: See TracBrowser for help on using the repository browser.