Changeset d48dfaf4 for general/prog
- Timestamp:
- 09/14/2018 01:13:00 AM (6 years ago)
- Branches:
- perl-modules
- Children:
- bc784a2
- Parents:
- 5faf7080
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
general/prog/perl-alternatives.xml
r5faf7080 rd48dfaf4 17 17 </indexterm> 18 18 19 <!--20 <sect3 role="installation" id="new-perl-standard-install"21 xreflabel="standard build and installation instructions">22 <title>Standard Installation of Perl Modules</title>23 24 <para>Install <application>Perl</application> modules by running the25 following commands:</para>26 27 <para>For <xref linkend="perl-data-uniqid"/>, first apply the required28 patch with:</para>29 30 <screen><userinput>patch -Np1 -i ../Data-Uniqid-&Data-Uniqid-version;-disable_failing_test-1.patch</userinput></screen>31 32 <para>Then, or for all other modules using the standard installation, proceed33 with:</para>34 35 <screen><userinput>perl Makefile.PL &&36 make &&37 make test</userinput></screen>38 39 <note>40 <para>If the module is described as using the <emphasis>unsafe</emphasis>41 variant of the Standard Installation, (the use of the current42 directory in <literal>@INC</literal> was removed for security reasons43 in <literal>perl-5.26.0</literal>)44 you should change the perl invocation to:</para>45 46 <screen><userinput>PERL_USE_UNSAFE_INC=1 &&</userinput></screen>47 48 <para>If, however, you are using the Auto Installation described below,49 that environment variable will be set whenever the <command>cpan</command>50 shell <command>install</command> is used.</para>51 </note>52 53 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>54 55 <screen role="root"><userinput>make install</userinput></screen>56 57 <note>58 <para>When reinstalling a <application>Perl</application> module,59 sometimes older versions of the module being reinstalled are in other60 directories specified in <parameter>@INC</parameter>. To delete all61 other versions of the module being reinstalled (not simply older ones)62 set the <varname>UNINST</varname> variable:</para>63 64 <screen><userinput>make install UNINST=1</userinput></screen>65 </note>66 67 </sect3>68 69 <sect3 role="installation" id="new-perl-build-install"70 xreflabel="instructions for packages using Build.PL">71 <title>Installation of Perl Modules which use Build.PL</title>72 73 <para>Install <application>Perl</application> modules which use74 Build.PL by running the following commands:</para>75 76 <screen><userinput>perl Build.PL &&77 ./Build &&78 ./Build test</userinput></screen>79 80 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>81 82 <screen role="root"><userinput>./Build install</userinput></screen>83 84 </sect3> -->85 86 19 <sect3 role="installation" id="new-perl-auto-install" 87 20 xreflabel="automatic installation of perl modules"> 88 21 <title> Automatic Installation of Perl Modules.</title> 89 22 90 <para> There is an alternate way of installing the modules using the91 <command>cpan</command> shell <command>install</command> command. The92 command automatically downloads the source from the CPAN archive, extracts93 it, runs the compilation, testing and installation commands mentioned94 above, and removes the build source tree. You may still need to install95 dependent library packages before running the automated installation96 method.</para>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> 97 30 98 <para>The first time you run <command>cpan</command>, you'll be prompted 99 to enter some information regarding download locations and methods. This 100 information is retained in files located in 101 <filename class='directory'>~/.cpan</filename>. Start the 102 <command>cpan</command> shell by issuing '<command>cpan</command>' as the 103 <systemitem class="username">root</systemitem> user. Any module may now be 104 installed from the 105 <emphasis role='underlined'><prompt>cpan> </prompt></emphasis> 106 prompt with the command:</para> 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> 107 60 108 61 <screen role="root"><userinput>install <replaceable><Module::Name></replaceable></userinput></screen> 109 62 110 <para>For additional commands and help, issue '<command>help</command>' 111 from the 112 <emphasis role='underlined'><prompt>cpan> </prompt></emphasis> 113 prompt.</para> 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> 114 69 115 <para>Alternatively, for scripted or non-interactive installations, use the 116 following syntax as the 117 <systemitem class="username">root</systemitem> user to install one or more 118 modules:</para> 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> 119 75 120 76 <screen role="root"><userinput>cpan -i <replaceable><Module1::Name> <Module2::Name></replaceable></userinput></screen> 121 77 122 <para>Review the <filename>cpan.1</filename> man page for additional 123 parameters you can pass to <command>cpan</command> on the command 124 line.</para> 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> 125 82 126 83 </sect3>
Note:
See TracChangeset
for help on using the changeset viewer.