0

I'm trying to downgrade my version of perl to 5.18.2 using perlbrew.

The installation terminates successfully (logs here and here), I can run the binary, it is listed as installed and when I try to install 5.18.2 again, perlbrew complains that it is already installed:

mb029:~ yueren$ perl5/perlbrew/perls/perl-5.18.2/bin/perl --version

This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin-2level
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2013, 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.

mb029:~ yueren$ perlbrew list
   perl-5.18.2

mb029:~ yueren$ perlbrew install --notest 5.18.2

ABORT: perl-5.18.2 is already installed.

However, when I try to switch to 5.18.2 perlbrew complains that it is not installed:

mb029:~ yueren$ perlbrew switch 5.18.2
5.18.2 is not installed

Is there a way to fix this behaviour or at least get more information on why perlbrew switch thinks the version is not installed?

edit: Sorry, my mistake. The correct call is

perlbrew switch perl-5.18.2

1 Answer 1

0

Switch module is deprecated. See: perldoc

Switch

Switch is buggy and should be avoided. You may find Perl's new given/when feature a suitable replacement. See Switch statements in perlsyn for more information.

See: https://perldoc.perl.org/5.30.0/perlsyn.html#Switch-Statements

1
  • Does perlbrew switch have anything to do with the perl Switch module? I don't think so. Commented Mar 8, 2020 at 15:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .