Logo

HPC @ Uni.lu

High Performance Computing in Luxembourg

FAQ: How Do I Install Perl Modules?

To install perl modules yourself, it’s easiest if you set up a local perl library with the local::lib module. This can also allow you to have multiple separate sets of perl modules at different locations (e.g. one for each of your projects).

First, load your desired perl version:

$> module load lang/Perl/5.22.0-ictce-7.3.5-bare

Now, set up a local perl library (see documentation):

$> wget "http://search.cpan.org/CPAN/authors/id/H/HA/HAARG/local-lib-2.000015.tar.gz"
$> tar -xzf local-lib-2.000015.tar.gz
$> cd local-lib-2.000015
$> perl Makefile.PL --bootstrap
$> make test && make install
$> echo '[ $SHLVL -eq 1 ] && eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"' >> ~/.bash_private
$> . ~/.bash_private

Finally, install the perl modules with cpan:

$> cpan
cpan> install Config::IniFiles