Installing Perl modules
If you need additional Perl modules, they can be installed into your
home directory. We recommend using
Anaconda to
create an environment with a self-contained, independent Perl install.
This will eliminate any conflicts from the system Perl version and
allow modules to be installed via cpan or cpanminus.
Create an environment with Perl installed¶
The following commands will create an environment called myperl, with
Perl and cpanminus installed.
Create myperl environment
module load anaconda
conda create -n myperl perl perl-app-cpanminus
Activate the environment¶
To use the environment, it must be activated.
Job submission
To use your created environment and installed modules in a SLURM job, the following lines must be included ahead of running any Perl program.
Activate environment
module load anaconda
source activate myperl
Installing a module from CPAN¶
Once the environment is activated, modules can be installed via
cpan or cpanm with no special configuration needed.
Install a module
cpanm My::Module