使用Perlbrew来管理多版本的Perl环境
想在一台机器上同时存在多个Perl版本,自由切换使用吗?Perlbrew就是这么一款工具,使用它可以自由地管理本地机器存在的Perl版本,并可任意使用,且不需要root权限。perlbrew is a admin-free perl installation management tool.Manage perl installations in your $HOME.

perlbrew is a program to automate the building and installation of perl in an easy way. It installs everything to ~/perl5/perlbrew, and requires you to tweak your PATH by including a bashrc/cshrc file it provides. You then can benefit from not having to run 'sudo' commands to install cpan modules because those are installed inside your HOME too. It provides multiple isolated perl environments, and a mechanism for you to switch between them.
这的安装使用非常方便,在它的官方及cpan上都有说明,笔者在此就不多言了。同时注意安装第三方cpan模块时,会安装下家目录的'~/perl5/perlbrew/perls/perl-version/lib‘目录下,它相当于屏蔽了系统中的perl版本及库,可以使用'perl -V'指令来看下目前的库路径。
使用者可以使用 Perlbrew 将不同版本的 Perl 安装在 $HOME 路径内,并且使用 Perlbrew 来切换不同版本的 Perl 使用。
不需要使用 sudo 来安装 CPAN 模块
可以使用每个月不断释出的新的 Perl
可尝试新的程序语言功能
可以不再被 Vendor Perl 限制 (平台内建的 Perl)
可在不同版本的 Perl 下测试模块
可整合至 bash, zsh, csh 环境
perlbrew is a tool to manage multiple perl installations in your $HOME directory. They are completely isolated perl universes. This approach has many benefits:
No need to run sudo to install CPAN modules, any more.
Try the monthly released new perls.
Learn new language features.
Test your production code against different perl versions.
Leave vendor perl (the one that comes with OS) alone
Vendor perl usually serves its own purposes, and it might be a bad idea to mess it up too much.
Especially PITA when trying to upgrade system perl.
Some vendors introduced their own perl bugs, twice!
Hacking perl internals.
Just to keep up with fashion.
While the default is good enough, you may customize it to install to alternative places, or even let multiple users share the whole perlbrew environment.
参考页面:
主页:http://perlbrew.pl/
cpan:http://search.cpan.org/dist/App-perlbrew/lib/App/perlbrew.pm
中文参考