Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The easiest method I have found so far is to say</p> <pre><code>wget -O- http://cpanmin.us | perl - -l ~/perl5 App::cpanminus local::lib eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib` echo 'eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`' &gt;&gt; ~/.profile echo 'export MANPATH=$HOME/perl5/man:$MANPATH' &gt;&gt; ~/.profile </code></pre> <p>This assumes your profile is named <code>.profile</code>, you may need to change that to be <code>.bash_profile</code>, <code>.bashrc</code>, etc. After that you can install modules by saying</p> <pre><code>cpanm Module::Name </code></pre> <p>and simply use them the same way you would if the were installed in the root directories.</p> <hr> <p>What follows is a brief explanation of what the commands above do.</p> <p><code>wget -O- http://cpanmin.us</code> fetches the latest version of <code>cpanm</code> and prints it to <code>STDOUT</code> which is then piped to <code>perl - -l ~/perl5 App::cpanminus local::lib</code>. The first <code>-</code> tells <code>perl</code> to expect the program to come in on <code>STDIN</code>, this makes <code>perl</code> run the version of <code>cpanm</code> we just downloaded. <code>perl</code> passes the rest of the arguments to <code>cpanm</code>. The <code>-l ~/perl5</code> argument tells <code>cpanm</code> where to install Perl modules, and the other two arguments are two modules to install. <code>[App::cpanmins</code>]<a href="http://search.cpan.org/dist/App-cpanminus/lib/App/cpanminus.pm" rel="noreferrer">1</a> is the package that installs <code>cpanm</code>. <a href="http://search.cpan.org/dist/local-lib/lib/local/lib.pm" rel="noreferrer"><code>local::lib</code></a> is a helper module that manages the environment variables needed to run modules in local directory.</p> <p>After those modules are installed we run </p> <pre><code>eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib` </code></pre> <p>to set the environment variables needed to use the local modules and then</p> <pre><code>echo 'eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`' &gt;&gt; ~/.profile </code></pre> <p>to ensure we will be able to use them the next time we log in.</p> <pre><code>echo 'export MANPATH=$HOME/perl5/man:$MANPATH' &gt;&gt; ~/.profile </code></pre> <p>will hopefully cause man to find the man pages for your local modules.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload