mhonarc-users

RE: osinit.pl -- patch needed for MSDOS and Win3.x systems

1999-05-06 09:51:24
OSINIT.PL seems to be set up to cope only with WIN32 systems ... or
rather, I presume it is, because it doesn't work on my
MSDOS6.22/WfWG3.11 system.

Under my system,the OS type is returned as "dos" -- which currently
isn't recognised -- OSINIT.PL checks only for a string containing
"win"

The fix only needs a simple change to one line.

Lines 65-69 of OSINIT.PL read:

------------
    } elsif (($^O !~ /cygwin/i) &&
          ($^O =~ /win/i) &&
          ($tmp = $ENV{'COMSPEC'}) &&
      ($tmp =~ /[a-zA-Z]:\\/) &&
      (-e $tmp)) {

Yes, that contains a bug.

This could have read:

     } elsif (($^O !~ /cygwin/i) &&
           (($^O =~ /win/i) ||
            (($tmp = $ENV{'COMSPEC'}) &&
             ($tmp =~ /[a-zA-Z]:\\/) &&
             (-e $tmp)))) {

If MHonArc requires Perl 5 now, the $^O check for DOS could replace the
check of COMSPEC's contents.

-- SP

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