Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^3: [OT] Why does newline in Windows print as having width?by anonymized user 468275 (Curate) |
on Aug 20, 2018 at 13:47 UTC ( [id://1220721]=note: print w/replies, xml ) | Need Help?? |
I studied these sources and they seem to be a wrapper for $^O. The docs for these modules justify their existence in two ways:-
- that $^O is an ugly three characters. - that families like 'linux, bsd, unix,' are grouped into one.
But the first justification would be better moved to the "use English" documentation, the pragma you seem to think is wrong and the second does not apply to the situation where the OP only wants to catch Windows. All that Devel::CheckOS does in this case is convert mswin32 to Win32. In addition I don't like some of the magic in these modules, requiring at one point a "no strict refs" for no very good reason. IMO, If you want to optmise $OSNAME, it would be better still to 'use English' and use 'something new' that adds a new variable like $OSFAMILY (*) to the set rather than interpreting $^O in a heavily over-engineered way (32k for the .tar.gz) (* update: and populated only once for the Perl process) One world, one people
In Section
Seekers of Perl Wisdom
|
|