Skip to content

The way to install newer version perl

yuki-kimoto edited this page May 6, 2011 · 8 revisions

The way to install newer version perl

If you use CentOS, perl version is 5.8.x. Mojolicious don't support 5.8.x . you need install newer version perl. Use perlbrew. It is easy to install perl to user directory.

Download perlbrew

curl -L http://xrl.us/perlbrew > perlbrew

Install perlbrew

perl perlbrew install

perlbrew is installed in the following directory.

~/perl5

Set perlbrew PATH.

echo "source $HOME/perl5/perlbrew/etc/bashrc" >> ~/.bashrc

Reload ".bashrc"

source ~/.bashrc

Initialize perlbrew

Initialize perlbrew.

perlbrew init

Install perl to user directory

perlbrew install perl-5.12.3

If you can't install perl, use -f option.

perlbrew install -f perl-5.12.3

List available perls.

perlbrew list

Available perls is displayed.

perl-5.12.3
    * /usr/bin/perl (5.8.8)

Switch perl.

perlbrew switch perl-5.12.3

Install cpanm

If you use cpanm for module installation, do this.

perlbrew install-cpanm
Clone this wiki locally