Peter J. Farley III [Sun, 5 Nov 2000 11:55:59 +0000 (06:55 -0500)]
Message-Id: <4.3.1.0.
20001105115341.00b35160@pop5.banet.net>
p4raw-id: //depot/perl@7559
print "1..0 # Skip: Sys::Syslog was not built\n";
exit 0;
}
+
+ require Socket;
+
+ # This code inspired by Sys::Syslog::connect():
+ require Sys::Hostname;
+ my ($host_uniq) = Sys::Hostname::hostname();
+ my ($host) = $host_uniq =~ /([A-Za-z0-9_.-]+)/;
+
+ if (! defined Socket::inet_aton($host)) {
+ print "1..0 # Skip: Can't lookup $host\n";
+ exit 0;
+ }
}
use Sys::Syslog qw(:DEFAULT setlogsock);