perl -MConfig -wE "say $Config{'osname'}; $Config{'osname'} = 'Unix'; +say $Config{'osname'}" MSWin32 Unix

Well ... when I build perl from official source (which I've done for perl-5.8.8 onwards), %Config is always readonly:
> perl -MConfig -wle "$Config{osname} = 'MSWin32';" %Config::Config is read-only
But I can see on my portable Strawberry builds that their %Config is indeed writeable. (I hadn't noticed that - thanks for pointing it out.)
Maybe that's how they deal with being unable to know perl's final destination.
I don't think it should be necessary for them to do this ... and it feels a bit unsafe (to me) to be dealing with it in this way.
I have a notion (unverified) that the location-dependent %Config keys can be reset appropriately by post-installation editing of lib/Config_heavy.pl.
Do Strawberry's msi installations also allow %Config to be overwritten ? (I don't have such an installation available.)

In any case, I don't think it has a bearing on this issue I'm dealing with.
I can see that there's no issue on perl-5.32.x, irrespective of whether %Config is readonly.
I know that the problem arises on perl-5.34.0 and later when %Config is readonly.
Even if, by some unlikely chance, the issue is avoided when %Config is not readonly, there's still an issue to deal with.

And I'm still unsure what needs fixing. I'll try to contact Ken Williams (as kcott suggested).

Cheers,
Rob

Update: I should probably point out that I don't see any problem with Path::Class itself - it's just that t/01-basic.t is presenting an issue that probably has nothing to do with Path::Class.

In reply to Re^4: Is it ever legitimate to override $^O ? by syphilis
in thread Is it ever legitimate to override $^O ? by syphilis

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.