berrybrew, the Perlbrew for Windows v1.26 released

I've finally found some time to get some wanted and needed changes implemented into berrybrew.

Some changes were for development and testing of the software itself, a couple of features were added due to community requests, and yet more were requested by a client.

Here's a summary of the new features:

  • Management of external Perl installations; Using the new berrybrew virtual command, one can bring in other installations of Perl for management under berrybrew. For example, if you have an ActiveState Perl installed on the system, you can virtualize it under berrybrew, and use or switch to it just like any of the portable Strawberry Perl's we normally manage. This means that you can switch over to your system Perl when needed, without having to modify PATH, or temporarily disabling berrybrew

  • Unattended installations are now possible. We no longer prompt for user acceptance when running the initial configuration

  • New quick argument to berrybrew switch; This allows you to switch to a different Perl instance persistently without having to close the existing CLI window and opening a new one (note: some binaries and features may not work correctly. If you run into problems, simply open a new window)

  • Export and import modules from one Perl instance to another; berrybrew modules export and berrybrew modules import will dump a list of all installed CPAN distribution names from one Perl and install it on others. The export files can be edited at will before re-importing, and you can even create your own module list files to use as you see fit. Using this feature, in conjunction with berrybrew clone allows you to easily set up template Perl instances for very quick Perl platform setup

  • Ability to change the location where File::HomeDir points to; you can switch between the Windows home directory location, or the default location that Strawberry Portable editions set

Here's an example of the new berrybrew virtual feature:

Configure an external Perl as a berrybrew-managed Perl ("active-state" is just a name you desire that'll show up in berrybrew list and berrybrew available):

> berrybrew virtual active-state

    Specify the path to the perl binary: c:\perl64\bin

    Specify the library path: c:\perl64\site\bin

    Specify an additional path:


    Successfully registered virtual perl active-state

Check that it took:

> berrybrew list

    5.16.3_64 *
    5.10.1_32 
    bb-as-test 
    active-state

> berrybrew available

    ... snip for brevity

    5.16.3_64       [installed] *
    5.16.3_32
    5.14.4_64
    5.14.4_32
    5.12.3_64
    5.12.3_32
    5.10.1_32       [installed]
    5.8.9_32
    bb-as-test      [installed] [custom]
    active-state    [installed] [virtual]

Verify we're still using the previous Perl:

> perl -v

    This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x64-multi-thread

Use the new one:

> berrybrew use active-state

    perl-active-state
    ==============
    Microsoft Windows [Version 10.0.17763.107]
    (c) 2018 Microsoft Corporation. All rights reserved.


    <berrybrew use active-state>: run "exit" leave this environment

Verify we're using the system's ActiveState Perl:

> perl -v

    This is perl 5, version 26, subversion 3 (v5.26.3) built for MSWin32-x64-multi-thread
    (with 2 registered patches, see perl -V for more detail)

    Copyright 1987-2018, Larry Wall

    Binary build 0000 [fde9aa8a] provided by ActiveState http://www.ActiveState.com
    Built Jul 31 2019 01:43:08

Once the new sub-shell is closed, confirm everything is sane:

> exit

    Exiting <berrybrew use active-state>

> perl -v

    This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x64-multi-thread

It doesn't need to be ActiveState Perl. Any external Perl installed on the system can be used. All we need is a path to the perl.exe binary, and any library paths (if available).

Leave a comment

About Steve Bertrand

user-pic Just Another Perl Hacker