Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by Discipulus (Canon)
on Aug 03, 2022 at 10:27 UTC ( [id://11145915]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Is it ever legitimate to override $^O ? -- Cwd and File::Spec
in thread Is it ever legitimate to override $^O ?

Ah!

..and Cwd that my spider sense supposed the first to be charged?

while your fakOS.pl behaves the same way for me.. the following Cwd version acts in the opposite way

C:>cat fakeOS.pl BEGIN { $^O = 'Unix'; } use strict; use warnings; use Cwd 'abs_path'; my $abs_path = abs_path('.'); print $abs_path; C:>perl fakeOS.pl C:\EX_D\ulisseDUE C:>perl -MTest::Harness fakeOS.pl C:/EX_D/ulisseDUE

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^4: Is it ever legitimate to override $^O ? -- Cwd
by syphilis (Archbishop) on Aug 03, 2022 at 13:54 UTC
    the following Cwd version acts in the opposite way

    Heh ... that's pretty flakey, too. (I see the same.)

    What I'd like to find is some code where the behaviour changes between perl-5.32 and perl-5.34.
    Apart from t/01-basic.t, everything I've tested (including your fakeOS.pl) is doing the same thing on both of those versions of perl.

    If I take your fakeOS.pl, change $^O = 'Unix'; to $^O = 'MSWin32' and run it on Ubuntu-20.04, I get:
    $ perl fakeOS.pl Use of uninitialized value $abs_path in concatenation (.) or string at + fakeOS.pl line 10.
    and
    $ perl -MTest::Harness fakeOS.pl /home/sisyphus/pscrpt
    Again, however, it's the same behaviour on perl-5.32 and perl-5.34.
    Interestingly, that error message when run without loading Test::Harness hints at being perhaps connected to the failure that t/01-basic.t is triggering on perl-5.34 and later.

    Dunno ... I think I just need to find the time to make one or two bug reports and let the experts sort it out.

    Cheers,
    Rob

Log In?
Username:
Password:

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

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

    No recent polls found