Changeset d48dfaf4


Ignore:
Timestamp:
09/14/2018 01:13:00 AM (6 years ago)
Author:
Ken Moffat <ken@…>
Branches:
perl-modules
Children:
bc784a2
Parents:
5faf7080
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/prog/perl-alternatives.xml

    r5faf7080 rd48dfaf4  
    1717    </indexterm>
    1818
    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 the
    25       following commands:</para>
    26 
    27       <para>For <xref linkend="perl-data-uniqid"/>, first apply the required
    28       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, proceed
    33       with:</para>
    34 
    35 <screen><userinput>perl Makefile.PL &amp;&amp;
    36 make &amp;&amp;
    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 current
    42         directory in <literal>@INC</literal> was removed for security reasons
    43         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 &amp;&amp;</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 other
    60         directories specified in <parameter>@INC</parameter>.  To delete all
    61         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 use
    74       Build.PL by running the following commands:</para>
    75 
    76 <screen><userinput>perl Build.PL &amp;&amp;
    77 ./Build &amp;&amp;
    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 
    8619    <sect3 role="installation" id="new-perl-auto-install"
    8720    xreflabel="automatic installation of perl modules">
    8821      <title> Automatic Installation of Perl Modules.</title>
    8922
    90       <para>There is an alternate way of installing the modules using the
    91       <command>cpan</command> shell <command>install</command> command. The
    92       command automatically downloads the source from the CPAN archive, extracts
    93       it, runs the compilation, testing and installation commands mentioned
    94       above, and removes the build source tree. You may still need to install
    95       dependent library packages before running the automated installation
    96       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>
    9730
    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&gt;&nbsp;</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&gt;&nbsp;</prompt></emphasis>
     58        prompt with the command:
     59      </para>
    10760
    10861<screen role="root"><userinput>install <replaceable>&lt;Module::Name&gt;</replaceable></userinput></screen>
    10962
    110       <para>For additional commands and help, issue '<command>help</command>'
    111       from the
    112       <emphasis role='underlined'><prompt>cpan&gt;&nbsp;</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&gt;&nbsp;</prompt></emphasis>
     67        prompt.
     68      </para>
    11469
    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>
    11975
    12076<screen role="root"><userinput>cpan -i <replaceable>&lt;Module1::Name&gt; &lt;Module2::Name&gt;</replaceable></userinput></screen>
    12177
    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>
    12582
    12683    </sect3>
Note: See TracChangeset for help on using the changeset viewer.