From: Jarkko Hietaniemi Date: Sat, 23 Jun 2001 13:16:26 +0000 (+0000) Subject: Also in Cygwin use Socket to figure out domainname X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=058e53a4638aa7eba382b3df4f4f6fa0ecfb7013;p=p5sagit%2Fp5-mst-13.2.git Also in Cygwin use Socket to figure out domainname (if any) (avoids trying to call external 'domainname', which doesn't at the moment exist in Cygwin) p4raw-id: //depot/perl@10858 --- diff --git a/lib/Net/Domain.pm b/lib/Net/Domain.pm index c1b0140..189bb73 100644 --- a/lib/Net/Domain.pm +++ b/lib/Net/Domain.pm @@ -28,7 +28,7 @@ sub _hostname { return $host if(defined $host); - if ($^O eq 'MSWin32') { + if ($^O eq 'MSWin32' || $^O eq 'cygwin') { require Socket; my ($name,$alias,$type,$len,@addr) = gethostbyname($ENV{'COMPUTERNAME'}||'localhost'); while (@addr)