[e305bb90] | 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 -->
|
---|
[6df794d] | 11 | <sect2 id="perl-alternatives" xreflabel="CPAN automated install of perl modules">
|
---|
[e305bb90] | 12 |
|
---|
[6df794d] | 13 | <title>CPAN automated install of perl modules</title>
|
---|
[e305bb90] | 14 |
|
---|
| 15 | <indexterm zone="perl-alternatives">
|
---|
[6df794d] | 16 | <primary sortas="a-cpan-install-of-perl-modules">CPAN automated install of perl modules</primary>
|
---|
[e305bb90] | 17 | </indexterm>
|
---|
| 18 |
|
---|
| 19 | <sect3 role="installation" id="new-perl-auto-install"
|
---|
[6df794d] | 20 | xreflabel="automatic installation of perl modules">
|
---|
| 21 | <title> Automatic Installation of Perl Modules.</title>
|
---|
[e305bb90] | 22 |
|
---|
[d48dfaf4] | 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> </prompt></emphasis>
|
---|
| 58 | prompt with the command:
|
---|
| 59 | </para>
|
---|
[e305bb90] | 60 |
|
---|
| 61 | <screen role="root"><userinput>install <replaceable><Module::Name></replaceable></userinput></screen>
|
---|
| 62 |
|
---|
[d48dfaf4] | 63 | <para>
|
---|
| 64 | For additional commands and help, issue '<command>help</command>'
|
---|
| 65 | from the
|
---|
| 66 | <emphasis role='underlined'><prompt>cpan> </prompt></emphasis>
|
---|
| 67 | prompt.
|
---|
| 68 | </para>
|
---|
[e305bb90] | 69 |
|
---|
[d48dfaf4] | 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>
|
---|
[e305bb90] | 75 |
|
---|
| 76 | <screen role="root"><userinput>cpan -i <replaceable><Module1::Name> <Module2::Name></replaceable></userinput></screen>
|
---|
| 77 |
|
---|
[d48dfaf4] | 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>
|
---|
[e305bb90] | 82 |
|
---|
| 83 | </sect3>
|
---|
| 84 |
|
---|
| 85 | </sect2>
|
---|