1# -*- perl -*- 2# 3 4require 5.004; 5use strict; 6 7require "t/lib.pl"; 8 9 10my $numTests = 10; 11my $numTest = 0; 12 13 14 15 16my($handle, $port); 17if (@ARGV) { 18 $port = $ARGV[0]; 19} else { 20 ($handle, $port) = Net::Daemon::Test->Child($numTests, 21 $^X, '-Iblib/lib', 22 '-Iblib/arch', 23 't/server', '--mode=single', 24 '--debug', '--timeout', 60); 25} 26 27my @opts = ('peeraddr' => '127.0.0.1', 'peerport' => $port, 'debug' => 1, 28 'application' => 'CalcServer', 'version' => 0.01, 29 'timeout' => 20); 30my $client; 31 32# Making a first connection and closing it immediately 33Test(eval { RPC::PlClient->new(@opts) }) 34 or print "Failed to make first connection: $@\n"; 35 36RunTests(@opts); 37eval { $handle->Terminate() } if $handle; 38