Perlbrew
Perlbrew is a tool to manage multiple perl installations in your $HOME directory.
Setup perlbrew for the first time
Section titled “Setup perlbrew for the first time”Create setup script ~/.perlbrew.sh:
Section titled “Create setup script ~/.perlbrew.sh:”# Reset any environment variables that could confuse `perlbrew`:export PERL_LOCAL_LIB_ROOT=export PERL_MB_OPT=export PERL_MM_OPT=
# decide where you want to install perlbrew:export PERLBREW_ROOT=~/perlbrew[[ -f "$PERLBREW_ROOT/etc/bashrc" ]] && source "$PERLBREW_ROOT/etc/bashrc"Create installation script install_perlbrew.sh:
Section titled “Create installation script install_perlbrew.sh:”source ~/.perlbrew.shcurl -L https://install.perlbrew.pl | bashsource "$PERLBREW_ROOT/etc/bashrc"
# Decide which version you would like to install:version=perl-5.24.1perlbrew install "$version"perlbrew install-cpanmperlbrew switch "$version"Run installation script:
Section titled “Run installation script:”./install_perlbrew.shAdd to the end of your ~/.bashrc
Section titled “Add to the end of your ~/.bashrc”[[ -f ~/.perlbrew.sh ]] && source ~/.perlbrew.shSource ~/.bashrc:
Section titled “Source ~/.bashrc:”source ~/.bashrcRemarks
Section titled “Remarks”See also