1

I'm running Centos 7.2, which has Perl 5.16 by default.

Some software one of my users has requested requires at least Perl 5.18, with a preference for 5.22. I've installed 5.24 in /opt/perl/5.24 using:

./Configure -des -Dprefix=/opt/perl/5.24 -Dotherlibdirs=/opt/perl/5.24/lib/perl5 -Uuseperlio

We use Environment Modules, and I only want this one piece of software to use this Perl version - it will otherwise be, in the jargon - "unsupported".

What environment variables now need to be set for the use of that software?

Obviously I'll append /opt/perl/5.24/bin to $PATH, but what other variables does perl need/require - for the installation of modules and etc? (using cpanimus)

I can see there is a $PERL5LIB, and a $PERL_PATH on various posts - but are these canonical for Perl or just related to the posts in question?

chicks
  • 3,793
  • 10
  • 27
  • 36
datakid
  • 349
  • 4
  • 17
  • The Programming Perl (third edition, http://www.geos.ed.ac.uk/~bmg/software/Perl%20Books/prog/ch19_02.htm ) would suggest that we only need $PERL5LIB but it also looks out of date. – datakid Sep 08 '16 at 04:35

1 Answers1

2

I don't think you should need any environment variables to be set, as long as your Perl is installed correctly. Simply invoking your perl interpreter should be sufficient. Environment variables relevant to perl are documented on the perlrun page of perldoc, but variables such as $PERL5LIB are only used to override the normal behavior. You should not need to set them in this situation.

Charley
  • 258
  • 2
  • 8