berrybrew, the perlbrew for Windows; rewritten and enhanced

For the people who use Windows, I've released berrybrew v1.04.

This software was originally written by David Farrell. While I was writing Test::BrewBuild, I needed some additional features (particularly the --with option for exec, and better PATH management). I wrote a couple of PRs, but they were rejected (not by David, but by the new maintainer). Not long after that, the person who had taken over the project disappeared, so I decided to permanently fork it, and nearly completely rewrite the whole thing.

It does everything the original does, but now includes far more:

  • Display available Strawberry Perls
  • Add/remove available Strawberry Perls by editing a JSON file
  • Install and remove Perl instances easily
  • Easily switch between installed Perl instances
  • Execute commands across all Perl installs, or just a select number
  • Ability to clone your Perl installations
  • Ability to easily disable berrybrew, and return to a system Perl
  • Thorough documentation for the berrybrew application, its C# API, configuration, and unit testing
  • Ability to clean its own temp directories and any orphaned Perl installations
  • Very simple installation/initialization via git clone, pre-packaged zip archive, or compile-your-own
  • Command subcommands have command-line help documentation
  • Automation build script for development
  • Automation release bundling script for development
  • Unit tests are written in Perl, and are run with a single command
  • Ability to specify where you want your base Perl installation directory to be located

The main README contains the majority of details on how one typically would use the software. There's also more extensive berrybrew documentation that explains things further, as well as detailed online Berrybrew API documentation for developers.

My favourite new feature is clone. Here are some of the benefits I've found with it:

  • Ability to name the cloned instance to your liking (currently, 25 char max)
  • Easily take snapshots of a Perl instance before making any changes to it, to provide an immediate restore point
  • Set up one instance with all the modules you typically use, then clone it as a template. This way, you can simply re-clone the template as many times as you want and you'll instantaneously have a brand new instance set up exactly to your liking
  • Project-specific instances - clone a base instance for specific projects, in order to ensure a consistent project environment
  • My favourite, set up development templates, then while debugging/building/testing your own modules, you can easily keep this development environment in pristine condition without any outside interference, with the ability to simply re-clone from the last snapshot if things go downhill, instead of installing a new instance from scratch

Other enhancements:

  • off command allows you to quickly disable your berrybrew Perls, which returns you to a system perl (if installed)
  • debug feature to enable certain verbose output, simply by adding debug after berrybrew and before a command. eg: berrybrew debug install 5.24.0_64
  • The entire PATH management components have been completely re-written, and work correctly in all cases, and now writes to the registry directly, allowing variable-based PATH names
  • There are unit tests!! (albeit I need more)
  • The Perl objects are now only generated once and stored in the main object, instead of being rebuilt in every method call (efficiency)
  • Configuration changes no longer need recompilation of the binary
  • remove functionality has been enhanced to not break in several cases

5 Comments

It's a wonderful job, congrats!

I download berrybrew.zip, but berrybrew.zip contains only data directory.

I found two same name "berrybrew" projects.

https://github.com/dnmfarrell/berrybrew

https://github.com/stevieb9/berrybrew

Are these different projects?


Leave a comment

About Steve Bertrand

user-pic Just Another Perl Hacker