anyenv is a great platform for installing local versions of all open open environments, including Perl:
$ git clone https://github.com/riywo/anyenv ~/.anyenv $ echo 'export PATH="$HOME/.anyenv/bin:$PATH"' >> ~/.bash_profile $ echo 'eval "$(anyenv init -)"' >> ~/.bash_profile
This will configure anyenv . Here you have installed plenv, a Perl environment tool. Each of the environment tools allows you to manage these languages ββin different installed versions.
$ anyenv install plenv
Now we can work with the plenv tool ...
List of available versions of Perl:
$ plenv install
Install the Perl 5.18.2 binary:
$ plenv install 5.18.2 -Dusethreads
Change global default Perl to 5.18.2:
$ plenv global 5.18.2
Change the local Perl project to 5.18.2:
$ plenv local 5.18.2
Run this command after installing the CPAN module containing the script executable:
$ plenv rehash
Install cpanm to the current Perl:
$ plenv install-cpanm
Install any modules from CPAN using
$ cpanm JSON
I use Carton to manage dependencies within a project and recommend that you take a look at it.
Now that you have anyenv , remember that you can learn other versions of other languages. anyenv is an invaluable tool.
$ anyenv install
source share