0

I am using perlbrew (App::perlbrew/0.67) on OS X 10.9

If I list the current installed Perl versions I get

$ perlbrew list
* perl-5.18.1 (5.18.2)
$ perl --version

This is perl 5, version 18, subversion 2 

So it seems that I have version 5.18.2 installed but listed as 5.18.1 (with the correct number in brackets)

$ perlbrew available
perl-5.19.11
perl-5.18.2
perl-5.16.3
...

perlbrew available is listing 5.18.2 (with 2). Is this normal or do I have a broken installation? Why does list show two versions (--help and the manual on CPAN do not show any hint).

Matteo
  • 14,696
  • 9
  • 68
  • 106
  • Maybe you have multiple versions of perl installed, it's not that uncommon. Check all your include paths and see if any of them lead to different versions – Analog May 13 '14 at 11:46
  • @Analog But should `list` not show them? – Matteo May 13 '14 at 11:51
  • Looks to me like you did a `perlbrew install` of 5.18.1 and then did a `perlbrew upgrade-perl` to that install when 5.18.2 was current. Don't be concerned about `perlbrew available`, it's just listing what's sitting on the server for convenient download... – tjd May 13 '14 at 12:33
  • @ikegami I get it now. It's the name and the version in parenthesis. I installed 5.18.1 and named it 5.18.1 and then updated it ... – Matteo May 13 '14 at 13:08

1 Answers1

2

perl-5.18.1 is just an arbitrary name. You sure picked a weird one for an install of 5.18.2!

This is my list on one machine:

  5.8.9                  # 5.8.9
  5.8.9d                 # Debugging build of 5.8.9
  5.14.2                 # 5.14.2
  feed_fetcher (5.14.2)  # Used by specific project
  5.16.3t                # Threaded build of 5.16.3
* 5.18.0t                # Threaded build of 5.18.0
  latest (5.18.0)        # An (outdated) alias

Unfortunately, you can't fix this by simply renaming the directory. You can do perlbrew install 5.18.2 to install 5.18.2 as 5.18.2, make sure it works, then delete $PERLBREW_ROOT/perls/5.18.1.


If you plan on upgrading a build using upgrade-perl, create it as follows:

perlbrew install --as 5.18 5.18.0

You'd switch to that install using

perlbrew use 5.18        # This shell only
perlbrew switch 5.18     # Switch default

That way, the name will still make sense after you issue perlbrew upgrade-perl.

ikegami
  • 367,544
  • 15
  • 269
  • 518