Perlbrew
From Asenjo
Installing a system-wide perlbrew Perl
- create a directory where perlbrew will install the new Perl version:
# mkdir /opt/perl5 [enter]
I chose to do it in /opt/perl5; if we change the permissions on this directory, we do not need to run the rest as root.
- declare a (temporary) environment variable PERLBREW_ROOT
$ export PERLBREW_ROOT=/opt/perl5
- download the perlbrew script and run it:
$ curl -L http://xrl.us/perlbrewinstall | bash [enter]
$ /opt/perlbrew/bin/perlbrew init [enter]
I actually reviewed the script before executing it, do not just run stuff off the internet without knowing what you are doing.
- modify your login script
In my case I use the bash shell, so I modified my .bashrc file:
export PERLBREW_ROOT=/opt/perl5
source /opt/perl5/etc/bashrc
source /opt/perl5/etc/perlbrew-completion.bash
After this, just install a new Perl version. You will need a c compiler, make and patch