[asperl] various changes to get asperl working under Borland
[p5sagit/p5-mst-13.2.git] / t / lib / io_sock.t
index c3701c5..0971e78 100755 (executable)
@@ -10,10 +10,11 @@ BEGIN {
 use Config;
 
 BEGIN {
-    if(-d "lib" && -f "TEST") {
-        if ( ($Config{'extensions'} !~ /\bSocket\b/ ||
-              $Config{'extensions'} !~ /\bIO\b/)    &&
-              !(($^O eq 'VMS') && $Config{d_socket})) {
+    if (-d "lib" && -f "TEST") {
+        if (!$Config{'d_fork'} ||
+           (($Config{'extensions'} !~ /\bSocket\b/ ||
+             $Config{'extensions'} !~ /\bIO\b/) &&
+            !(($^O eq 'VMS') && $Config{d_socket}))) {
            print "1..0\n";
            exit 0;
         }
@@ -51,6 +52,10 @@ if($pid = fork()) {
 
 } elsif(defined $pid) {
 
+    # This can fail if localhost is undefined or the
+    # special 'loopback' address 127.0.0.1 is not configured
+    # on your system. (/etc/rc.config.d/netconfig on HP-UX.)
+
     $sock = IO::Socket::INET->new(PeerPort => $port,
                                  Proto => 'tcp',
                                  PeerAddr => 'localhost'