No domainname(1) in Cygwin, either, and the 2>/dev/null
Jarkko Hietaniemi [Mon, 22 Oct 2001 21:00:18 +0000 (21:00 +0000)]
doesn't seem to help (the error being output to console, maybe?)

p4raw-id: //depot/perl@12592

lib/Net/Domain.pm

index bd57996..a47933d 100644 (file)
@@ -165,7 +165,7 @@ sub _hostdomain {
         };
 
        chop($dom = `domainname 2>/dev/null`)
-               unless(defined $dom || $^O eq 'MSWin32');
+               unless(defined $dom || $^O =~ /^(MSWin32|cygwin)$/);
 
        if(defined $dom) {
            my @h = ();