in reply to Re: $^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.

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.