-
StackOverflow 文档
-
Perl Language 教程
-
Perlbrew
-
第一次设置 perlbrew
创建设置脚本~/.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"
创建安装脚本 install_perlbrew.sh
:
source ~/.perlbrew.sh
curl -L https://install.perlbrew.pl | bash
source "$PERLBREW_ROOT/etc/bashrc"
# Decide which version you would like to install:
version=perl-5.24.1
perlbrew install "$version"
perlbrew install-cpanm
perlbrew switch "$version"
运行安装脚本:
./install_perlbrew.sh
添加到你的~/.bashrc
的末尾
[[ -f ~/.perlbrew.sh ]] && source ~/.perlbrew.sh
来源~/.bashrc
:
source ~/.bashrc