... "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

In reply to Re: Upgrading Strawberry Perl While Preserving Non-Core Modules by syphilis
in thread Upgrading Strawberry Perl While Preserving Non-Core Modules by roho

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.