DEV Community

David Cantrell
David Cantrell

Posted on

perlbrew improved

I like to keep all my builds of perl under the control of perlbrew, so I can easily switch between them. I occasionally need to build a version of perl that hasn't been released yet, and maybe hasn't even been merged into blead (which is what the perl5 project calls the master branch). That's fine, perlbrew can just build from a git checkout. However, you need to give it some extra arguments to avoid confusion (you generally don't want it to build something called 'perl-5.35.3' when that's just the latest version to have been released in the repo, but not what you're actually building) and to help you remember which build is which. So, as is traditional for a Unixy gentleman with a problem to solve, I wrote a small shell script.

Source this into your shell after loading perlbrew and if you then say perlbrew git-install from the root of a git repository it will build a perl called git-$reponame-$branchname-$commit.

Top comments (0)