Installing Perl packages

1. Perl availability

When you need to install a specific Perl module you DO NOT have to install perl, cpan or cpanm. We provide a Perl version that can be accessed via module. The base installs already have a lot of added packages. To find out what Perl is available:

[user@login-x:~]$ module avail perl
---------------------- /opt/rcic/Modules/modulefiles/LANGUAGES ---------------------------

Steps below explain the basic steps specific to the cluster.

For a detailed info on installing Perl packages please see How to Install Perl CPAN modules

2. Install Perl modules

Perl has thousands of specific packages and it is not possible for us to maintain them all. For this reason users can easily add their desired packages to the base installs using local user area. The local installation of Perl packages will go to the $HOME/perl5 and is automatically available to the user.

  1. Get an interactive node

    Always claim an interactive node because some packages builds involve compilation and downloads that can use a lot of CPU time and memory.

    [user@login-x:~]$ srun -c 2 -p free --pty /bin/bash -i
  2. Load desired module

    For building in your user area, first you need to load Perl module:

    [user@login-x:~]$ module load perl/5.30.0

    Check that perl and cpanm are available to you, the output of the commands should be similar to:

    [user@login-x:~]$ which perl
    [user@login-x:~]$ which cpanm
  3. Install your software package

    Below we provide a common installation example using cpanm.

    [user@login-x:~]$ cpanm X::Tiny
    --> Working on X::Tiny
    Fetching ... OK
    Configuring X-Tiny-0.21 ... OK
    ==> Found dependencies: Test::FailWarnings
    --> Working on Test::FailWarnings
    Fetching ... OK
    Configuring Test-FailWarnings-0.008 ... OK
    Building and testing Test-FailWarnings-0.008 ... OK
    Successfully installed Test-FailWarnings-0.008
    Building and testing X-Tiny-0.21 ... OK
    Successfully installed X-Tiny-0.21
    2 distributions installed