From: Jarkko Hietaniemi Date: Mon, 11 Dec 2000 22:50:59 +0000 (+0000) Subject: Tune further the OS detection of CGI. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ac1855b3e7d7100eed1eddcfad6fb51e0f2e6351;p=p5sagit%2Fp5-mst-13.2.git Tune further the OS detection of CGI. p4raw-id: //depot/perl@8086 --- diff --git a/lib/CGI.pm b/lib/CGI.pm index f49b618..617c605 100644 --- a/lib/CGI.pm +++ b/lib/CGI.pm @@ -107,19 +107,17 @@ unless ($OS) { $OS = $Config::Config{'osname'}; } } -if ($OS=~/win32/i) { +if ($OS =~ /^MSWin/i) { $OS = 'WINDOWS'; -} elsif ($OS=~/vms/i) { +} elsif ($OS =~ /^VMS/i) { $OS = 'VMS'; -} elsif ($OS=~/bsdos/i) { - $OS = 'UNIX'; -} elsif ($OS=~/dos/i) { +} elsif ($OS =~ /^dos/i) { $OS = 'DOS'; -} elsif ($OS=~/^MacOS$/i) { +} elsif ($OS =~ /^MacOS/i) { $OS = 'MACINTOSH'; -} elsif ($OS=~/os2/i) { +} elsif ($OS =~ /^os2/i) { $OS = 'OS2'; -} elsif ($OS=~/epoc/) { +} elsif ($OS =~ /^epoc/i) { $OS = 'EPOC'; } else { $OS = 'UNIX';