Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

berrybrew, the Perlbrew for Windows v1.15 released

by stevieb (Abbot)
on Jul 28, 2017 at 22:33 UTC ( #1196244=perlnews: print w/replies, xml ) Need Help??

I've released berrybrew version 1.15.

All of the credit for this update goes to pryrt who went far above and beyond with this PR. It's a pleasure to have him contributing to this (or any) project.

The significant change here is the addition of the use command. I feel that this addition adds tremendous value to the software, and makes it much easier to use.

This allows you to temporarily switch to one of your other installed Perl instances either in the same command window or new ones without switching your currently switched to one. Here are some examples:

Temporarily use a different installed version, in the same window. Typing exit will return you to your previous environment within the same window:

c:\>berrybrew use 5.10.1_32 Perl-5.10.1_32 ============== Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. <berrybrew use 5.10.1_32>: run "exit" leave this environment c:\>

Calling exit returns you to your previous environment within the same CLI window.

You can also use multiple versions within the same window. Using this method will cascade the instances:

c:\>berrybrew use 5.10.1_32,5.8.9_32 Perl-5.10.1_32 ============== Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. <berrybrew use 5.10.1_32>: run "exit" leave this environment c:\>exit Exiting <berrybrew use 5.10.1_32> Perl-5.8.9_32 ============== Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. <berrybrew use 5.8.9_32>: run "exit" leave this environment c:\>exit Exiting <berrybrew use 5.8.9_32> c:\>

Let's actually pop up a couple of new windows instead of using the one you're currently using:

c:\>berrybrew use --win 5.8.9_32,5.10.1_32 berrybrew use 5.8.9_32: spawned in new command window berrybrew use 5.10.1_32: spawned in new command window c:\>
# first new window <berrybrew use Perl-5.8.9_32> c:\>
# second new window <berrybrew use Perl-5.10.1_32> c:\>

I can't exactly show you the output without a screenshot, but I'm sure you get the gist. You can continue working in your main window, but execute things in the other two who have the respective version of Perl loaded and ready to go.

pryrt, I can't thank you enough for all of the hard work you've put into this. I mean, not just the new feature, but cleaning up erroneous whitespace, completely enhancing the whole test framework, updating the docs and meticulously adding tests while fully and completely explaining everything clearly. Cheers!

Replies are listed 'Best First'.
Re: berrybrew, the Perlbrew for Windows v1.15 released
by pryrt (Vicar) on Jul 28, 2017 at 23:20 UTC

    You're welcome. I'm glad my ideas and contributions were useful to someone else (I knew they were useful to me: I really wanted the use functionality. I just wasn't sure anyone else would.) Thanks for all your efforts on maintaining and improving berrybrew.

      As I've said before, I rarely use Windows for anything (outside of work), but quite some time ago, I built Test::BrewBuild so I could automate my own CI for my own distributions across both Unix and Windows seamlessly, and I took over berrybrew so that I could do exactly what you have been doing; adding the pieces I needed it to do so I could dispatch over the network unit test runs to it.

      Already, I am finding your feature exceptionally handy, and it'll make it easier for me to work on my projects on Windows going forward if I choose/need. Create a command alias for new, and I spawn a new window with the currently running Perl so that I can kick off something in the main window immediately after spawning a new environment that's exactly the same so I can do something else in it.

      I also like kicking off new windows for separate versions as I can run the same command in all of them, and visually see what's happening in parallel without having to run commands sequentially in the same window after using switch, which of course forces window closure/reopen.

Re: berrybrew, the Perlbrew for Windows v1.15 released (wishlist)
by vr (Hermit) on Jul 30, 2017 at 19:29 UTC

    Not sure if this comment is worth posting at berrybrew's homepage, therefore, here. To match sudo-less-ness of Perlbrew, maybe it's better to modify not "system", but "user" PATH environment variable. It was slightly discomforting :) to run berrybrew with elevated privileges. We are all admins at our Windows, but still... Also, a minor inconvenience (a bit untidy) was to find a .cpanm folder in the root of my C drive. The portable Strawberry Perl defines HOME environment variable to hide it.

    OTOH, if the purpose of berrybrew was to install/manage Perls at system level regardless of logged-in user, then please ignore this comment :)

      Thanks vr for the feedback.

      There was never any intention or desire to use an admin account, believe me.

      The issue stems from the fact that Windows forces the SYSTEM PATH over the USER one, and that causes problems. Any suggestions welcome on how to evade this in C# would be exceptionally welcome. This has been discussed numerous times outside of the issue tracker with those who are close to the project, as well as outside of it.

      As far as the .cpanm directory being in the root of c:/, I'll look into that. Normally it goes into the perl installation directory. Thanks for the note :) Normally though, this is directed by outside forces, so I'm not sure if it can be corrected within berrybrew or not. Again, I'll look into it. Always feel free to open an issue though. There are no good or bad issues, just ones that are taken seriously and will be responded to with respect and consideration. You have my word on that.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlnews [id://1196244]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2018-08-20 16:15 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (192 votes). Check out past polls.