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

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

perl modules branch: Next batch of modules. In particular, drop the no-longer-used IPv6 deps from Try::Tiny and update the runtime depen dency for URI to HTTP::Message.

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

  • Property mode set to 100644
File size: 3.4 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 for the module and any missing prerequisite modules listed by upstream.
28 Then for each module it extracts it, runs the compilation, the tests and
29 installs it.
30 </para>
31
32 <para>
33 You still need to install any non-perl dependencies before running
34 the automated installation method. You may wish to clean out the
35 <filename class="directory">build/</filename> directory after
36 installing, to free up the space. If any post-install actions such
37 as creating a symlink are mentioned, you should also do those.
38 </para>
39
40 <para>
41 The first time you run <command>cpan</command>, you'll be prompted
42 to enter some information regarding download locations and methods. This
43 information is retained in files located in
44 <filename class='directory'>~/.cpan</filename>.
45 </para>
46
47 <para>
48 In particular, you may wish to configure it so that <xref linkend="sudo"/>
49 is used for the installs, allowing you to build and test as a regular user.
50 The following examples have not used that approach.
51 </para>
52
53 <para>
54 Start the
55 <command>cpan</command> shell by issuing '<command>cpan</command>' as the
56 <systemitem class="username">root</systemitem> user. Any module may now be
57 installed from the
58 <emphasis role='underlined'><prompt>cpan&gt;&nbsp;</prompt></emphasis>
59 prompt with the command:
60 </para>
61
62<screen role="root"><userinput>install <replaceable>&lt;Module::Name&gt;</replaceable></userinput></screen>
63
64 <para>
65 For additional commands and help, issue '<command>help</command>'
66 from the
67 <emphasis role='underlined'><prompt>cpan&gt;&nbsp;</prompt></emphasis>
68 prompt.
69 </para>
70
71 <para>
72 Alternatively, for scripted or non-interactive installations, use the
73 following syntax as the <systemitem class="username">root</systemitem>
74 user to install one or more modules:
75 </para>
76
77<screen role="root"><userinput>cpan -i <replaceable>&lt;Module1::Name&gt; &lt;Module2::Name&gt;</replaceable></userinput></screen>
78
79 <para>
80 Review the <filename>cpan.1</filename> man page for additional
81 parameters you can pass to <command>cpan</command> on the command line.
82 </para>
83
84 </sect3>
85
86 </sect2>
Note: See TracBrowser for help on using the repository browser.