Manage Perl installations with perlbrew
developperlbrew allows you to install, list, and switch between multiple isolated Perl environments in your $HOME directory. This avoids the need for sudo when installing CPAN modules.
Common Workflow:
- Check available versions: See what versions are available to install.
- Install a version: Download and build a specific Perl version.
- List installed versions: See which Perls you have already built.
- Switch versions: Set a specific version as the default for your shell.
- Use a version temporarily: Use a specific version only in the current shell session without changing the default.
- Turn off perlbrew: Revert to using the system Perl.
# See what is available
perlbrew available
# Install specific versions
perlbrew install 5.32.1
perlbrew install perl-5.28.3
# List installed Perls
perlbrew list
# Switch to a version and set it as default
perlbrew switch perl-5.32.1
# Temporarily use a version in the current shell
perlbrew use perl-5.28.3
# Turn off perlbrew and go back to system perl
perlbrew off
# Turn it back on
perlbrew switch perl-5.32.1
perlbrew use perl-5.32.1