in reply to Is it ever legitimate to override $^O ?

(BTW, I don't know how that override hack even works.)
File::Spec picks the parent class basing on $^O: https://metacpan.org/release/XSAWYERX/PathTools-3.75/source/lib/File/Spec.pm#L19
Is overriding $^O a legitimate thing to do ?
It's a terrible hack.
  • Comment on Re: Is it ever legitimate to override $^O ?

Replies are listed 'Best First'.
Re^2: Is it ever legitimate to override $^O ?
by syphilis (Archbishop) on Aug 02, 2022 at 11:42 UTC
    It's a terrible hack.

    I think that was my reaction, too.
    The question is "Having worked in perl-5.32.x and earlier, should this hack be expected to continue working in 5.34.x and onwards ?"
    I don't know the answer ... but maybe we should just work on rewriting t/01-basic.t such that the hack is not needed.

    BTW, thanks for pointing out the part that File::Spec plays in this.

    Cheers,
    Rob