mhonarc-users

Re: NT and MHonArc

1997-09-12 03:29:27
Earl Hood wrote:
With 5.003 the special variable $^O was introduced.  It's existance (for
older perls) and the NT specific value could be used to determine the
operation system.

Of course, this breaks Perl 4 compatibility.  For Perl 5, I
got the starts of module for dealing with OS dependent stuff.
The current module is attached to this message.

Depends who you use it.  Something like that shold work with all perl5 
version in the new OSUtil.pm

        if (defined $^O) {
           $_ = $^O;
        } else {
           require Config;      # For perl before 5.003
           $_ = %Config::Config{'osname'}
        }

So the startup penalty of loading Config is avoided if possible.

Steve Pacenkas change posted ealier works with perl4 and perl5 ( -w
clean, needs an additional ( (defined($^O) && ($^O eq "MSWin32)) || .. )

Achim

<Prev in Thread] Current Thread [Next in Thread>