source: chapter06/perl.xml@ 27de9a4f

7.5-systemd 7.6-systemd 7.7-systemd 7.8-systemd 7.9-systemd
Last change on this file since 27de9a4f was 27de9a4f, checked in by Krejzi <krejzi@…>, 11 years ago

Merge XML::Parser into Perl page.

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

  • Property mode set to 100644
File size: 21.0 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 corrects an error in the way that <command>perldoc</command>
87 invokes the <command>less</command> program.</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 role="installation">
125 <title>Installation of XML::Parser</title>
126
127 <para>Extract the XML::Parser tarball and change to the extracted
128 directory:</para>
129
130<screen><userinput remap="pre">tar xf ../XML-Parser-&xml-parser-version;.tar.gz
131cd XML-Parser-&xml-parser-version;</userinput></screen>
132
133 <para>Prepare XML::Parser for compilation:</para>
134
135<screen><userinput remap="configure">perl Makefile.PL</userinput></screen>
136
137 <para>Compile the package:</para>
138
139<screen><userinput remap="make">make</userinput></screen>
140
141 <para>To test the results, issue:</para>
142
143<screen><userinput remap="test">make test</userinput></screen>
144
145 <para>Install the package:</para>
146
147<screen><userinput remap="install">make install</userinput></screen>
148
149 </sect2>
150
151 <sect2 id="contents-perl" role="content">
152 <title>Contents of Perl</title>
153
154 <segmentedlist>
155 <segtitle>Installed programs</segtitle>
156 <segtitle>Installed libraries</segtitle>
157 <segtitle>Installed directory</segtitle>
158
159 <seglistitem>
160 <seg>a2p, c2ph, config_data, corelist, cpan, cpan2dist, cpanp,
161 cpanp-run-perl, enc2xs, find2perl, h2ph, h2xs,
162 instmodsh, json_pp, libnetcfg, perl, perl&perl-version; (link to perl),
163 perlbug, perldoc, perlivp, perlthanks (link to perlbug), piconv, pl2pm,
164 pod2html, pod2latex, pod2man, pod2text, pod2usage, podchecker,
165 podselect, prove, psed (link to s2p), pstruct (link to c2ph), ptar,
166 ptardiff, ptargrep, s2p, shasum, splain, xsubpp, and zipdetails</seg>
167 <seg>Several hundred which cannot all be listed here</seg>
168 <seg>/usr/lib/perl5</seg>
169 </seglistitem>
170 </segmentedlist>
171
172 <variablelist>
173 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
174 <?dbfo list-presentation="list"?>
175 <?dbhtml list-presentation="table"?>
176
177 <varlistentry id="a2p">
178 <term><command>a2p</command></term>
179 <listitem>
180 <para>Translates awk to Perl</para>
181 <indexterm zone="ch-system-perl a2p">
182 <primary sortas="b-a2p">a2p</primary>
183 </indexterm>
184 </listitem>
185 </varlistentry>
186
187 <varlistentry id="c2ph">
188 <term><command>c2ph</command></term>
189 <listitem>
190 <para>Dumps C structures as generated from
191 <command>cc -g -S</command></para>
192 <indexterm zone="ch-system-perl c2ph">
193 <primary sortas="b-c2ph">c2ph</primary>
194 </indexterm>
195 </listitem>
196 </varlistentry>
197
198 <varlistentry id="config_data">
199 <term><command>config_data</command></term>
200 <listitem>
201 <para>Queries or changes configuration of Perl modules</para>
202 <indexterm zone="ch-system-perl config_data">
203 <primary sortas="b-config_data">config_data</primary>
204 </indexterm>
205 </listitem>
206 </varlistentry>
207
208 <varlistentry id="corelist">
209 <term><command>corelist</command></term>
210 <listitem>
211 <para>A commandline frontend to Module::CoreList</para>
212 <indexterm zone="ch-system-perl corelist">
213 <primary sortas="b-corelist">corelist</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
218 <varlistentry id="cpan">
219 <term><command>cpan</command></term>
220 <listitem>
221 <para>Interact with the Comprehensive Perl Archive Network (CPAN)
222 from the command line</para>
223 <indexterm zone="ch-system-perl cpan">
224 <primary sortas="b-cpan">cpan</primary>
225 </indexterm>
226 </listitem>
227 </varlistentry>
228
229 <varlistentry id="cpan2dist">
230 <term><command>cpan2dist</command></term>
231 <listitem>
232 <para>The CPANPLUS distribution creator</para>
233 <indexterm zone="ch-system-perl cpan2dist">
234 <primary sortas="b-cpan2dist">cpan2dist</primary>
235 </indexterm>
236 </listitem>
237 </varlistentry>
238
239 <varlistentry id="cpanp">
240 <term><command>cpanp</command></term>
241 <listitem>
242 <para>The CPANPLUS launcher</para>
243 <indexterm zone="ch-system-perl cpanp">
244 <primary sortas="b-cpanp">cpanp</primary>
245 </indexterm>
246 </listitem>
247 </varlistentry>
248
249 <varlistentry id="cpanp-run-perl">
250 <term><command>cpanp-run-perl</command></term>
251 <listitem>
252 <para>Perl script that is used to enable flushing of the output
253 buffer after each write in spawned processes</para>
254 <indexterm zone="ch-system-perl cpanp-run-perl">
255 <primary sortas="b-cpanp-run-perl">cpanp-run-perl</primary>
256 </indexterm>
257 </listitem>
258 </varlistentry>
259
260 <varlistentry id="enc2xs">
261 <term><command>enc2xs</command></term>
262 <listitem>
263 <para>Builds a Perl extension for the Encode module from either
264 Unicode Character Mappings or Tcl Encoding Files</para>
265 <indexterm zone="ch-system-perl enc2xs">
266 <primary sortas="b-enc2xs">enc2xs</primary>
267 </indexterm>
268 </listitem>
269 </varlistentry>
270
271 <varlistentry id="find2perl">
272 <term><command>find2perl</command></term>
273 <listitem>
274 <para>Translates <command>find</command> commands to Perl</para>
275 <indexterm zone="ch-system-perl find2perl">
276 <primary sortas="b-find2perl">find2perl</primary>
277 </indexterm>
278 </listitem>
279 </varlistentry>
280
281 <varlistentry id="h2ph">
282 <term><command>h2ph</command></term>
283 <listitem>
284 <para>Converts <filename class="extension">.h</filename> C header
285 files to <filename class="extension">.ph</filename> Perl header
286 files</para>
287 <indexterm zone="ch-system-perl h2ph">
288 <primary sortas="b-h2ph">h2ph</primary>
289 </indexterm>
290 </listitem>
291 </varlistentry>
292
293 <varlistentry id="h2xs">
294 <term><command>h2xs</command></term>
295 <listitem>
296 <para>Converts <filename class="extension">.h</filename> C header
297 files to Perl extensions</para>
298 <indexterm zone="ch-system-perl h2xs">
299 <primary sortas="b-h2xs">h2xs</primary>
300 </indexterm>
301 </listitem>
302 </varlistentry>
303
304 <varlistentry id="instmodsh">
305 <term><command>instmodsh</command></term>
306 <listitem>
307 <para>Shell script for examining installed Perl modules,
308 and can even create a tarball from an installed module</para>
309 <indexterm zone="ch-system-perl instmodsh">
310 <primary sortas="b-instmodsh">instmodsh</primary>
311 </indexterm>
312 </listitem>
313 </varlistentry>
314
315 <varlistentry id="json_pp">
316 <term><command>json_pp</command></term>
317 <listitem>
318 <para>Converts data between certain input and output formats</para>
319 <indexterm zone="ch-system-perl json_pp">
320 <primary sortas="b-json_pp">json_pp</primary>
321 </indexterm>
322 </listitem>
323 </varlistentry>
324
325 <varlistentry id="libnetcfg">
326 <term><command>libnetcfg</command></term>
327 <listitem>
328 <para>Can be used to configure the
329 <filename class="libraryfile">libnet</filename> Perl module</para>
330 <indexterm zone="ch-system-perl libnetcfg">
331 <primary sortas="b-libnetcfg">libnetcfg</primary>
332 </indexterm>
333 </listitem>
334 </varlistentry>
335
336 <varlistentry id="perl">
337 <term><command>perl</command></term>
338 <listitem>
339 <para>Combines some of the best features of C, <command>sed</command>,
340 <command>awk</command> and <command>sh</command> into a single
341 swiss-army language</para>
342 <indexterm zone="ch-system-perl perl">
343 <primary sortas="b-perl">perl</primary>
344 </indexterm>
345 </listitem>
346 </varlistentry>
347
348 <varlistentry id="perl-version">
349 <term><command>perl&perl-version;</command></term>
350 <listitem>
351 <para>A hard link to <command>perl</command></para>
352 <indexterm zone="ch-system-perl perl-version">
353 <primary sortas="b-perl&perl-version;">perl&perl-version;</primary>
354 </indexterm>
355 </listitem>
356 </varlistentry>
357
358 <varlistentry id="perlbug">
359 <term><command>perlbug</command></term>
360 <listitem>
361 <para>Used to generate bug reports about Perl, or the modules that come
362 with it, and mail them</para>
363 <indexterm zone="ch-system-perl perlbug">
364 <primary sortas="b-perlbug">perlbug</primary>
365 </indexterm>
366 </listitem>
367 </varlistentry>
368
369 <varlistentry id="perldoc">
370 <term><command>perldoc</command></term>
371 <listitem>
372 <para>Displays a piece of documentation in pod format that is embedded
373 in the Perl installation tree or in a Perl script</para>
374 <indexterm zone="ch-system-perl perldoc">
375 <primary sortas="b-perldoc">perldoc</primary>
376 </indexterm>
377 </listitem>
378 </varlistentry>
379
380 <varlistentry id="perlivp">
381 <term><command>perlivp</command></term>
382 <listitem>
383 <para>The Perl Installation Verification Procedure; it can be used to
384 verify that Perl and its libraries have been installed
385 correctly</para>
386 <indexterm zone="ch-system-perl perlivp">
387 <primary sortas="b-perlivp">perlivp</primary>
388 </indexterm>
389 </listitem>
390 </varlistentry>
391
392 <varlistentry id="perlthanks">
393 <term><command>perlthanks</command></term>
394 <listitem>
395 <para>Used to generate thank you messages to mail to the Perl
396 developers</para>
397 <indexterm zone="ch-system-perl perlthanks">
398 <primary sortas="b-perlthanks">perlthanks</primary>
399 </indexterm>
400 </listitem>
401 </varlistentry>
402
403 <varlistentry id="piconv">
404 <term><command>piconv</command></term>
405 <listitem>
406 <para>A Perl version of the character encoding converter
407 <command>iconv</command></para>
408 <indexterm zone="ch-system-perl piconv">
409 <primary sortas="b-piconv">piconv</primary>
410 </indexterm>
411 </listitem>
412 </varlistentry>
413
414 <varlistentry id="pl2pm">
415 <term><command>pl2pm</command></term>
416 <listitem>
417 <para>A rough tool for converting Perl4
418 <filename class="extension">.pl</filename> files to Perl5
419 <filename class="extension">.pm</filename> modules</para>
420 <indexterm zone="ch-system-perl pl2pm">
421 <primary sortas="b-pl2pm">pl2pm</primary>
422 </indexterm>
423 </listitem>
424 </varlistentry>
425
426 <varlistentry id="pod2html">
427 <term><command>pod2html</command></term>
428 <listitem>
429 <para>Converts files from pod format to HTML format</para>
430 <indexterm zone="ch-system-perl pod2html">
431 <primary sortas="b-pod2html">pod2html</primary>
432 </indexterm>
433 </listitem>
434 </varlistentry>
435
436 <varlistentry id="pod2latex">
437 <term><command>pod2latex</command></term>
438 <listitem>
439 <para>Converts files from pod format to LaTeX format</para>
440 <indexterm zone="ch-system-perl pod2latex">
441 <primary sortas="b-pod2latex">pod2latex</primary>
442 </indexterm>
443 </listitem>
444 </varlistentry>
445
446 <varlistentry id="pod2man">
447 <term><command>pod2man</command></term>
448 <listitem>
449 <para>Converts pod data to formatted *roff input</para>
450 <indexterm zone="ch-system-perl pod2man">
451 <primary sortas="b-pod2man">pod2man</primary>
452 </indexterm>
453 </listitem>
454 </varlistentry>
455
456 <varlistentry id="pod2text">
457 <term><command>pod2text</command></term>
458 <listitem>
459 <para>Converts pod data to formatted ASCII text</para>
460 <indexterm zone="ch-system-perl pod2text">
461 <primary sortas="b-pod2text">pod2text</primary>
462 </indexterm>
463 </listitem>
464 </varlistentry>
465
466 <varlistentry id="pod2usage">
467 <term><command>pod2usage</command></term>
468 <listitem>
469 <para>Prints usage messages from embedded pod docs in files</para>
470 <indexterm zone="ch-system-perl pod2usage">
471 <primary sortas="b-pod2usage">pod2usage</primary>
472 </indexterm>
473 </listitem>
474 </varlistentry>
475
476 <varlistentry id="podchecker">
477 <term><command>podchecker</command></term>
478 <listitem>
479 <para>Checks the syntax of pod format documentation files</para>
480 <indexterm zone="ch-system-perl podchecker">
481 <primary sortas="b-podchecker">podchecker</primary>
482 </indexterm>
483 </listitem>
484 </varlistentry>
485
486 <varlistentry id="podselect">
487 <term><command>podselect</command></term>
488 <listitem>
489 <para>Displays selected sections of pod documentation</para>
490 <indexterm zone="ch-system-perl podselect">
491 <primary sortas="b-podselect">podselect</primary>
492 </indexterm>
493 </listitem>
494 </varlistentry>
495
496 <varlistentry id="prove">
497 <term><command>prove</command></term>
498 <listitem>
499 <para>Command line tool for running tests against the Test::Harness
500 module.</para>
501 <indexterm zone="ch-system-perl prove">
502 <primary sortas="b-prove">prove</primary>
503 </indexterm>
504 </listitem>
505 </varlistentry>
506
507 <varlistentry id="psed">
508 <term><command>psed</command></term>
509 <listitem>
510 <para>A Perl version of the stream editor <command>sed</command></para>
511 <indexterm zone="ch-system-perl psed">
512 <primary sortas="b-psed">psed</primary>
513 </indexterm>
514 </listitem>
515 </varlistentry>
516
517 <varlistentry id="pstruct">
518 <term><command>pstruct</command></term>
519 <listitem>
520 <para>Dumps C structures as generated from <command>cc -g -S</command>
521 stabs</para>
522 <indexterm zone="ch-system-perl pstruct">
523 <primary sortas="b-pstruct">pstruct</primary>
524 </indexterm>
525 </listitem>
526 </varlistentry>
527
528 <varlistentry id="ptar">
529 <term><command>ptar</command></term>
530 <listitem>
531 <para>A <command>tar</command>-like program written in Perl</para>
532 <indexterm zone="ch-system-perl ptar">
533 <primary sortas="b-ptar">ptar</primary>
534 </indexterm>
535 </listitem>
536 </varlistentry>
537
538 <varlistentry id="ptardiff">
539 <term><command>ptardiff</command></term>
540 <listitem>
541 <para>A Perl program that compares an extracted archive with an
542 unextracted one</para>
543 <indexterm zone="ch-system-perl ptardiff">
544 <primary sortas="b-ptardiff">ptardiff</primary>
545 </indexterm>
546 </listitem>
547 </varlistentry>
548
549 <varlistentry id="ptargrep">
550 <term><command>ptargrep</command></term>
551 <listitem>
552 <para>A Perl program that applies pattern matching to the contents
553 of files in a tar archive</para>
554 <indexterm zone="ch-system-perl ptargrep">
555 <primary sortas="b-ptargrep">ptargrep</primary>
556 </indexterm>
557 </listitem>
558 </varlistentry>
559
560 <varlistentry id="s2p">
561 <term><command>s2p</command></term>
562 <listitem>
563 <para>Translates <command>sed</command> scripts to Perl</para>
564 <indexterm zone="ch-system-perl s2p">
565 <primary sortas="b-s2p">s2p</primary>
566 </indexterm>
567 </listitem>
568 </varlistentry>
569
570 <varlistentry id="shasum">
571 <term><command>shasum</command></term>
572 <listitem>
573 <para>Prints or checks SHA checksums</para>
574 <indexterm zone="ch-system-perl shasum">
575 <primary sortas="b-shasum">shasum</primary>
576 </indexterm>
577 </listitem>
578 </varlistentry>
579
580 <varlistentry id="splain">
581 <term><command>splain</command></term>
582 <listitem>
583 <para>Is used to force verbose warning diagnostics in Perl</para>
584 <indexterm zone="ch-system-perl splain">
585 <primary sortas="b-splain">splain</primary>
586 </indexterm>
587 </listitem>
588 </varlistentry>
589
590 <varlistentry id="xsubpp">
591 <term><command>xsubpp</command></term>
592 <listitem>
593 <para>Converts Perl XS code into C code</para>
594 <indexterm zone="ch-system-perl xsubpp">
595 <primary sortas="b-xsubpp">xsubpp</primary>
596 </indexterm>
597 </listitem>
598 </varlistentry>
599
600 <varlistentry id="zipdetails">
601 <term><command>zipdetails</command></term>
602 <listitem>
603 <para>Displays details about the internal structure of a Zip file</para>
604 <indexterm zone="ch-system-perl zipdetails">
605 <primary sortas="b-zipdetails">zipdetails</primary>
606 </indexterm>
607 </listitem>
608 </varlistentry>
609
610 </variablelist>
611
612 </sect2>
613
614</sect1>
Note: See TracBrowser for help on using the repository browser.