Set up a private Perl Module library for Your User Space

Nowadays, it's common for people providing programs or scripts to assume everyone's an admin, and can load whatever library or do whatever admin-level install they need to do. All their installation instructions assume you can just install files to /usr/local/lib and such. Well as an SDF user on the cluster or Metaarray, you can't do this, so you need to figure out how to install these things 'not as admin' (which used to be pretty common knowledge).

For perl programs, cpanm is a perl package manager that's already installed on SDF. Run each of the lines below to create a personal perl module library to be able to add modules that may be missing when you try to run some perl scripts you wrote or obtained.

curl 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`' >> ~/.profile
echo 'export MANPATH=$HOME/perl5/man:$MANPATH' >> ~/.profile

Afterwards, you will be able to just run cpanm to add a library that your perl script is complaining about being missing. For example:

cpanm Text::Markdown


You can find more tips like this at: Common Configurations for Programs