develooper Front page | perl.perl6.language | Postings from January 2001

Re: JWZ on s/Java/Perl/

Thread Previous | Thread Next
January 29, 2001 01:17
Re: JWZ on s/Java/Perl/
Message ID:
On Sun, Jan 28, 2001 at 11:54:13PM -0600, Jarkko Hietaniemi wrote:
> On Sun, Jan 28, 2001 at 08:56:33PM -0500, Michael G Schwern wrote:
> > On Sun, Jan 28, 2001 at 10:07:55PM +0100, Bart Lateur wrote:
> > > Uhm, I'm sorry, but that's not good enough. You cannot distinguish
> > > between Windows 95/98/ME on one side, and NT/2k on the other, using $^O
> > > alone. After all, $^O is just a constant burnt into the executable when
> > > perl was compiled. You can run the same perl.exe on all platforms, and
> > > indeed, most people do. Yet win9* and NT are different enough in
> > > behaviour (e.g. flock) to warrant a test on platform. Er... which is: no
> > > go.
> > 
> > Well, fork works on both now, but I see your point.  There are ways of
> > detecting the OS at run-time under Windows, mostly through MFC junk or
> > peeking in the registry.  It would probably be good to do it for the
> > MacOS versions, too.
> The desire to know the name of the runtime platform is a misdirected desire.
> What you really want to know is whether function Foo will be there, what
> kind of signature it has, whether file Bar will be there, what kind of
> format it has, and so on, whether a feature Zog is present, or what
> is the value of parameter Blah.  Just knowing the name of the platform
> doesn't buy you a whole lot.

You want both of course, if only to present the user an error message
(s)he can understand.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About