Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Is it ever legitimate to override $^O ?

by Anonymous Monk
on Aug 02, 2022 at 07:44 UTC ( [id://11145888]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-19 16:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found