我安装了两个版本的Perl --as(只用主编号命名版本)
5.20.0安装为5.20和5.20.0 安装线程为 5.20t这是输出 perlbrew list
* 5.20 (5.20.0)
5.20t (5.20.0)
Run Code Online (Sandbox Code Playgroud)
然后我将Perl升级为5.20.1使用
$ perlbrew upgrade-perl
Upgrading 5.20 to 5.20.1
Installing /Users/corti/perl5/perlbrew/build/perl-5.20.1 into ~/perl5/perlbrew/perls/5.20
This could take a while. You can run the following command on another shell to track the status:
tail -f ~/perl5/perlbrew/build.perl-5.20.1.log
5.20 is successfully installed.
Run Code Online (Sandbox Code Playgroud)
Perl似乎正确升级(v5.20.1):
$ perl -version
This is perl 5, version 20, subversion 1 (v5.20.1) built for darwin-2level
Copyright 1987-2014, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Run Code Online (Sandbox Code Playgroud)
但是perlbrew list不承认新版本并且调用perlbrew upgrade-perl再次进行升级
$ perlbrew list
* 5.20 (5.20.0)
5.20t (5.20.0)
Run Code Online (Sandbox Code Playgroud)
为什么不perlbrew识别更新?
因为 perlbrew 检查名为的文件是否存在
perls/*/.version
Run Code Online (Sandbox Code Playgroud)
并使用其内容来确定安装的 Perl 版本。如果找不到该文件,则会回退到运行 perl 可执行文件
perls/*/bin/perl
Run Code Online (Sandbox Code Playgroud)
确定安装的版本并创建 .version 文件。
Upgrade-perl 命令无法更新文件,因此后续运行无法正确检测已安装的版本。我已提交错误报告