Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Upgrading Strawberry Perl While Preserving Non-Core Modules

by syphilis (Archbishop)
on Apr 30, 2022 at 02:44 UTC ( [id://11143462]=note: print w/replies, xml ) Need Help??


in reply to Upgrading Strawberry Perl While Preserving Non-Core Modules

... "cpan -a" generates its module in: "C:\strawberry\cpan\Bundle\Snapshot_2022_04_29_00.pm" ...

I have many (lost count) perls of different versions and configurations on my Windows box - some were provided by the Strawberry Perl project, others not.
The one thing I do like is that they all use the same cpan directory - namely \Users\me\.cpan.

I'm not sure how this is achieved, but every time I install a new windows perl (whether it's from Strawberry or not), the cpan utility just automatically uses C:\Users\me\.cpan as its cpan directory.
Perhaps this is partly reliant on the HOMEDRIVE and HOMEPATH environment variables which, for me, specify (respectively) C: and \Users\me.
The only snag I've ever encountered with this arrangement is that .cpan/CPAN/MyConfig.pm likes to name the actual flavour of make - but that flavour could be any of gmake, dmake or nmake.
I've therefore altered my \Users\me\.cpan\CPAN\MyConfig.pm to begin with:
use Config; $make = $Config{make} =~ /dmake/ ? q[C:\\_32\\dmake\\dmake.EXE] : $Config{make} =~ /nmake/i ? $Config +{make} : q[C:\\_ +32\\make\\bin\\make.EXE];
(You could just specify $make = $Config{make} if you're sure that the requisite flavour of make is going to be in your path.)
Additionally, further down in MyConfig.pm, the 'make' setting needs to be altered to 'make' => $make,
Note that on 64-bit Windows, it doesn't matter whether the make utility (of whatever flavour) is 32-bit or 64-bit.

Out of curiosity, I ran cpan -a in quick succession from 2 different perls.
The 1st created \Users\me\.cpan\Bundle\Snapshot_2022_04_30_00.pm .
The 2nd created \Users\me\.cpan\Bundle\Snapshot_2022_04_30_01.pm .

I regard this unifying of the CPAN directories as one of the "smartest things I ever did".
And, as with most of the other "smartest things I ever did", I'm not exactly sure just how I did it ;-)

Cheers,
Rob

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2024-04-25 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found