This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate mainline
[perl5.git] / lib / Net / Domain.pm
index c1b0140..189bb73 100644 (file)
@@ -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)