in reply to $^O eq 'Win32' is a bad idea.
in thread use Win2000; and alike

Your "forward compatible" test may wind up more convoluted than you think. No matter what you try.

Give people string identifiers to work with and they will screw up any notion of compatibility. Take a look at what various versions of IE report themselves as sometime to get around bad browser detect code...

Replies are listed 'Best First'.
Re: Re: $^O eq 'Win32' is a bad idea.
by demerphq (Chancellor) on Jun 06, 2002 at 11:52 UTC
    Your "forward compatible" test may wind up more convoluted than you think. No matter what you try.

    Well, I'm not so sure I follow you. For instance if $^O was changed to return "Win32 Win2000" or the like then the test should work fine. So long as the "Win32" was not excised completely what I suggested seems to be a reasonable path forward. The issue here is not with the test, but with the logic applied to deciding what should be returned. If the later is terrible then of course the former doesnt have a lot of hope. Also dont forget that deciding what $^O is at the mercy of the perl5-porters, a group that IMO has more credibility than MS with regard to this kind of thing.

    Oh I'm basing the above comments on the idea that $^O shouldnt really be hard coded. Or least shouldnt be hard coded on an MS box. Other OS's may require the hard coding, MS doesn't.

    Yves / DeMerphq
    ---
    Writing a good benchmark isnt as easy as it might look.

Re^2: $^O eq 'Win32' is a bad idea.
by Aristotle (Chancellor) on Jun 06, 2002 at 15:33 UTC
    Like demerphq said, IE and the code that produces its User-Agent string was written by a team that's part of a company I believe has time and again proven they care about standards more in the sense of how to trample them best. Somehow I do not think of the people behind Perl as a group with similar mindset.

    Makeshifts last the longest.