Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Strawberry Perl - installing an older version

by syphilis (Bishop)
on Mar 10, 2020 at 02:45 UTC ( #11114062=note: print w/replies, xml ) Need Help??


in reply to Strawberry Perl - installing an older version

A newer version of Strawberry Perl (64-bit) is already installed.

I handle multiple versions of Strawberry Perl by installing the portable zip instead of the MSI. Just grab strawberry-perl-5.26.3.1-64bit-portable.zip (or strawberry-perl-5.26.3.1-32bit-portable.zip for 32-bit architecture), cd to
C:\Users\ken\local\opt\strawberry_perl\5_026_003\install
and unzip it.

Having done that, executing C:\Users\ken\local\opt\strawberry_perl\5_026_003\install\portableshell.bat will open a cmd.exe shell with the PATH already set to point at the 5.26.3 installation.

UPDATE:
I can remove these in fact, I half suspect that will be necessary ...

I believe that won't be necessary - the shell opened by potrtableshell.bat will prepend the pre-existing PATH with the location of perl-5.26.3.
Any other shell that's not created by portableshell.bat will still point to perl-5.30.0.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Strawberry Perl - installing an older version (portable)
by kcott (Bishop) on Mar 10, 2020 at 04:31 UTC

    G'day Rob,

    ++ Many thanks. That's pretty much exactly what I was looking for. I followed your instructions and everything worked perfectly.

    When I came back to write this, I saw your update. Actually, in my case, removing the 5_030_000 was necessary; although, a simple s/30_000/26_003/ on three lines was all that was required. I also removed the ActivePerl entries from the path. The reason is that if something is not found under 5.26, I want to know about it; instead of a something that I'd previously installed under 5.30 (or 5.16) being silently used — I'm not sure how likely that might be, but now I can be certain it won't happen. I've documented all paths and the changes I've made — probably less than a minute's work to swap to a different version.

    So now my PATH looks like this (split up, and a chuck removed from the middle, for ease of viewing):

    C:\Users\ken\tmp>echo %PATH% C:\Users\ken\local\opt\strawberry_perl\5_026_003\install\perl\site\bin +; C:\Users\ken\local\opt\strawberry_perl\5_026_003\install\perl\bin; C:\Users\ken\local\opt\strawberry_perl\5_026_003\install\c\bin; ...; C:\Users\ken\local\bin

    I get the added benefit of only having to start cmd.exe:

    C:\Users\ken\tmp>perl -v This is perl 5, version 26, subversion 3 (v5.26.3) built for MSWin32-x +64-multi-thread ... C:\Users\ken\tmp>perl -E "say for @INC" C:/Users/ken/local/opt/strawberry_perl/5_026_003/install/perl/site/lib C:/Users/ken/local/opt/strawberry_perl/5_026_003/install/perl/vendor/l +ib C:/Users/ken/local/opt/strawberry_perl/5_026_003/install/perl/lib

    This is probably not ideal if you want to quickly swap between versions; however, for my current ($work) needs, it's spot on. Thanks again.

    — Ken

      Everything that you've mentioned is the reason behind berrybrew. It does all of that path documenting and management itself. It provides you the ability to switch between versions with a single command (or in newer versions, with a couple of clicks of the mouse as well).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2020-06-02 15:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (19 votes). Check out past polls.

    Notices?