4 unless(grep /blib/, @INC) {
6 @INC = '../lib' if -d '../lib';
13 if(-d "lib" && -f "TEST") {
14 if ( ($Config{'extensions'} !~ /\bSocket\b/ ||
15 $Config{'extensions'} !~ /\bIO\b/) &&
16 !(($^O eq 'VMS') && $Config{d_socket})) {
23 $PATH = "/tmp/sock-$$";
25 # Test if we can create the file within the tmp directory
26 if (-e $PATH or not open(TEST, ">$PATH")) {
31 unlink($PATH) or die "Can't unlink $PATH: $!";
39 $listen = IO::Socket::UNIX->new(Local=>$PATH, Listen=>0) || die "$!";
44 $sock = $listen->accept();
47 print $sock->getline();
54 unlink($PATH) || warn "Can't unlink $PATH: $!";
58 } elsif(defined $pid) {
60 $sock = IO::Socket::UNIX->new(Peer => $PATH) or die "$!";
64 print $sock->getline();