in reply to Is it ever legitimate to override $^O ?
no clues by me, only other doubts..
In the very first place I dont understand why a module aimed to help with path and filenames plays so dirty on testing, faking a Unix mode
Second, as I dont have any strawberry available newer than 5.32 I played a bit with the t/01-basic.t and I discovered it fails in the same way even with this modified part:
use Config; BEGIN { #$^O = 'Unix'; # Test in Unix mode $Config{'osname'} = 'Unix'; warn "DEBUG: config: ",$Config{'osname'}," -- \$^O: $^O\n"; }
So $Config{'osname'} and $^O are indipendent and the above code is only influenced by $^O.
In perlvar I read: $^O .. The value is identical to $Config{'osname'}. They are identical but not bound.
Infact the module you are talking about rely on the core module File::Spec (..yes, boring to use but works very well) and it simply inspect $^O as you can see. And yes you can also try $^O = ''; to fake the Unix mode.
With my poor understanding I can find nothing in perldelta about osname nor about $^O
As last doubt I have noting at Entity.pm line 76. ..merely a blank line after the sub resolve ending.
L*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is it ever legitimate to override $^O ?
by syphilis (Archbishop) on Aug 02, 2022 at 12:12 UTC | |
by Discipulus (Canon) on Aug 02, 2022 at 15:24 UTC | |
by syphilis (Archbishop) on Aug 03, 2022 at 02:01 UTC |