plenv = Perl binary manager
Use plenv to pick a Perl version for your app. Compared with perlbrew, plenv supports project local version determination.
WSL = Windows Subsystem for Linux -Installation Guide
- check Linux version:
lsb_release -a # Description: Ubuntu 16.04.4 LTS
- update WSL (Ubuntu) and install build tools (e.g. make)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
- install plenv
git clone https://github.com/tokuhirom/plenv.git ~/.plenv
echo 'export PATH="$HOME/.plenv/bin:$PATH"' >> ~/.profile
echo 'eval "$(plenv init -)"' >> ~/.profile
exec $SHELL -l
- check system perl version:
perl -v
- install Perl 5.26.1
plenv help
plenv install --list
plenv install 5.26.1 # this step takes a while
plenv global 5.26.1 # change global default perl to 5.26.1
plenv rehash
perl -v
plenv install-cpanm # install cpanm for Perl 5.26.1
Perl 5.26.1 is now installed in the home directory, the system’s Perl is intact.