The University of Arizona
    For questions, please open a UAService ticket and assign to the Tools Team.
Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »


Perl is only installed to the operating system and is 5.10.1 -  perl --version


There are two versions of Perl available on Ocelote

  1. Perl 5.10.1 is the default if you just want to use the system version -  perl --version
  2. Perl 5.22.1 is the default module provided with module load perl; instmodsh

Perl Module Policy

We will provide a version of perl through modules and the user is expected to create their own perl environment using perl-virtualenv.

Here is a useful Perl tutorial: 
Additionally O'Reilly Media is a well regarded source for Perl 

Installing Perl Packages Using perl-virtualenv

One of the best things about Perl is the number of packages provided by the user community. Installing packages generally requires root access but that is not a viable solution in the HPC environment.

There is an easy solution. You can use perl-virtualenv to create a personal Perl environment that will persist for each time you log in.  There is no risk of packages being updated under you for another user.  

Here is an example session:

[netid@login2 ~]$ module list
Currently Loaded Modulefiles:
  1) pbspro/   2) gcc/5.2.0

[netid@login2 ~]$ module load perl

[netid@login2 ~]$ perl-virtualenv my_project
perl: /cm/shared/uaapps/perl/5.22.1/bin/perl
venv: /home/u13/netid/my_project

[netid@login2 ~]$ source my_project/bin/activate
Attempting to create directory /home/u13/chrisreidy/my_project

(my_project)[netid@login2 ~]$ cpanm -i Config::Trivial
--> Working on Config::Trivial
Fetching ... OK
Configuring Config-Trivial-0.81 ... OK
==> Found dependencies: Pod::Coverage, Test::Pod::Coverage, IO::Capture
--> Working on Pod::Coverage
Fetching ... OK
Configuring Pod-Coverage-0.23 ... OK
Building and testing Pod-Coverage-0.23 ... OK
Successfully installed Pod-Coverage-0.23
--> Working on Test::Pod::Coverage
Fetching ... OK
Configuring Test-Pod-Coverage-1.10 ... OK
Building and testing Test-Pod-Coverage-1.10 ... OK
Successfully installed Test-Pod-Coverage-1.10
--> Working on IO::Capture
Fetching ... OK
Configuring IO-Capture-0.04 ... OK
Building and testing IO-Capture-0.05 ... OK
Successfully installed IO-Capture-0.05
Building and testing Config-Trivial-0.81 ... OK
Successfully installed Config-Trivial-0.81
4 distributions installed

  • No labels