4 unless(grep /blib/, @INC) {
6 @INC = '../lib' if -d '../lib';
13 if (-d "lib" && -f "TEST") {
14 if (!$Config{'d_fork'} ||
15 (($Config{'extensions'} !~ /\bSocket\b/ ||
16 $Config{'extensions'} !~ /\bIO\b/) &&
17 !(($^O eq 'VMS') && $Config{d_socket}))) {
29 $listen = IO::Socket::INET->new(Listen => 2,
35 # Check if can fork with dynamic extensions (bug in CRT):
37 system "$^X -I../lib -MOpcode -e 'defined fork or die' > /dev/null 2>&1") {
38 print "ok $_ # skipped: broken fork\n" for 2..5;
42 $port = $listen->sockport;
46 $sock = $listen->accept();
50 print $sock->getline();
60 } elsif(defined $pid) {
62 # This can fail if localhost is undefined or the
63 # special 'loopback' address 127.0.0.1 is not configured
64 # on your system. (/etc/rc.config.d/netconfig on HP-UX.)
65 # As a shortcut (not recommended) you could change 'localhost'
66 # here to be the name of this machine eg 'myhost.mycompany.com'.
68 $sock = IO::Socket::INET->new(PeerPort => $port,
70 PeerAddr => 'localhost'
72 or die "$! (maybe your system does not have the 'localhost' address defined)";
78 print $sock->getline();