Perlbrew List and Wrong Version Number

I installed two versions of Perl using --as (naming the version only the main number)

  • 5.20.0 set as 5.20 and
  • 5.20.0 with stream set as 5.20t

This is the result of perlbrew list

 * 5.20 (5.20.0) 5.20t (5.20.0) 

Then I upgraded Perl to 5.20.1 using

 $ 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. 

Perl seems to be updated correctly ( 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. 

But the perlbrew list does not recognize the new version and the call to perlbrew upgrade-perl updates again

 $ perlbrew list * 5.20 (5.20.0) 5.20t (5.20.0) 

Why perlbrew n't perlbrew recognize the update?

+5
source share
1 answer

Because perlbrew checks for a file named

 perls/*/.version 

and uses its contents to determine which version of Perl is installed. If it does not find the file, it returns to running the perl executable

 perls/*/bin/perl 

to determine the installed version and create the .version file.

The upgrade-perl command cannot update the file, so subsequent runs will not correctly determine the installed version. I logged a bug report

+2
source

Source: https://habr.com/ru/post/1202578/


All Articles