source: general/prog/perl-alternatives.xml@ d48dfaf4

perl-modules
Last change on this file since d48dfaf4 was d48dfaf4, checked in by Ken Moffat <ken@…>, 6 years ago

perl modules branch: For the cpan install, remove the comments, rework the text to be nicely indented in the paragraphs, and mention that build directories need to be manually removed, clarify text on library deps, remark that post install commands such as symlinks need to be run manually - for the moment, all I am aware of is the sgmlspm symlink, and the best info I can find is that docbook-utils needs it, unsure how true that is - and for Christopher mention using sudo so that the tests can be run as a user.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/perl-modules@20498 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 3.3 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 <!-- it seems at least one entity is needed -->
8 <!ENTITY perl-alternatives-dummy "42">
9]>
10 <!-- Begin perl alternatives -->
11 <sect2 id="perl-alternatives" xreflabel="CPAN automated install of perl modules">
12
13 <title>CPAN automated install of perl modules</title>
14
15 <indexterm zone="perl-alternatives">
16 <primary sortas="a-cpan-install-of-perl-modules">CPAN automated install of perl modules</primary>
17 </indexterm>
18
19 <sect3 role="installation" id="new-perl-auto-install"
20 xreflabel="automatic installation of perl modules">
21 <title> Automatic Installation of Perl Modules.</title>
22
23 <para>
24 There is an alternate way of installing the modules using the
25 <command>cpan</command> shell <command>install</command> command. The
26 command automatically downloads the latest source from the CPAN archive,
27 extracts it, then runs the compilation, testing and installation
28 commands mentioned above.
29 </para>
30
31 <para>
32 You still need to install any non-perl dependencies before running
33 the automated installation method. You may wish to clean out the
34 <filename class="directory">build/</filename> directory after
35 installing, to free up the space. If any post-install actions such
36 as creating a symlink are mentioned, you should also do those.
37 </para>
38
39 <para>
40 The first time you run <command>cpan</command>, you'll be prompted
41 to enter some information regarding download locations and methods. This
42 information is retained in files located in
43 <filename class='directory'>~/.cpan</filename>.
44 </para>
45
46 <para>
47 In particular, you may wish to configure it so that <xref linkend="sudo"/>
48 is used for the installs, allowing you to build and test as a regular user.
49 The following examples have not used that approach.
50 </para>
51
52 <para>
53 Start the
54 <command>cpan</command> shell by issuing '<command>cpan</command>' as the
55 <systemitem class="username">root</systemitem> user. Any module may now be
56 installed from the
57 <emphasis role='underlined'><prompt>cpan&gt;&nbsp;</prompt></emphasis>
58 prompt with the command:
59 </para>
60
61<screen role="root"><userinput>install <replaceable>&lt;Module::Name&gt;</replaceable></userinput></screen>
62
63 <para>
64 For additional commands and help, issue '<command>help</command>'
65 from the
66 <emphasis role='underlined'><prompt>cpan&gt;&nbsp;</prompt></emphasis>
67 prompt.
68 </para>
69
70 <para>
71 Alternatively, for scripted or non-interactive installations, use the
72 following syntax as the <systemitem class="username">root</systemitem>
73 user to install one or more modules:
74 </para>
75
76<screen role="root"><userinput>cpan -i <replaceable>&lt;Module1::Name&gt; &lt;Module2::Name&gt;</replaceable></userinput></screen>
77
78 <para>
79 Review the <filename>cpan.1</filename> man page for additional
80 parameters you can pass to <command>cpan</command> on the command line.
81 </para>
82
83 </sect3>
84
85 </sect2>
Note: See TracBrowser for help on using the repository browser.