Skip to content
Kang-min Liu edited this page Nov 22, 2021 · 129 revisions

Perlbrew

perlbrew is an admin-free perl installation management tool. The latest version is 0.93, read the release note: Release 0.93.

For a quick installation, do this:

\curl -L https://install.perlbrew.pl | bash

Check the document of Installation for more descriptions and options.

perlbrew is a tool to manage multiple perl installations in your $HOME directory (or wherever you specify). They are completely isolated perl universes, and has no relationship with system perl.

This approach has many benefits:

  • No need to run sudo to install CPAN modules, any more.
  • Try the monthly released new perls with ease and learn new language features.
  • Test your code against different perl versions.
  • Leave vendor perl (the one that comes with OS) alone and avoid multiple hazards
    • Vendor perl usually serves its own purposes, and it might be a bad idea to mess it up too much.
    • Especially PITA when trying to upgrade system perl.
    • Some vendors introduced their own perl bugs, twice!
  • Hacking perl internals.
  • Just to keep up with fashion.

You may optionally chose alternative places for installation, or even let multiple uses share the whole perlbrew environment.

perlbrew is simple

To install the latest stable release, and use it from now on:

perlbrew install perl-5.34.0
perlbrew switch perl-5.34.0

To play with the bleeding-edge version, but only in the current shell:

perlbrew install perl-blead
perlbrew use perl-blead

Runs myprogram.pl against all installations of perl, especially helpful when running tests:

perlbrew exec perl myprogram.pl

For basic usage cheatsheet:

perlbrew -h

For more descriptions about commands,

perlbrew help

Articles

More Articles

Development

perlbrew has always been improving, it is an open source project for everyone to participate. There are currently over 80 contributors and growing. The code repository is located on github. Feel free to send a bug report, a pull request, or a beer. Everything helps :)

Clone this wiki locally