Branch Coverage

blib/lib/Test/TCP.pm
Criterion Covered Total %
branch 38 44 86.3


line true false branch
23 2 31 unless exists $args{$k}
38 14 3 if (@_ and ref $_[0] eq 'HASH') { }
1 2 elsif (@_ == 3) { }
49 3 14 unless defined $host
53 0 17 unless Net::EmptyPort::wait_port({'host', $host, 'port', $port, 'max_wait', $max_wait})
62 1 20 @_ == 1 ? :
63 1 20 unless exists $args{'code'}
71 1 19 if ($self->{'listen'}) { }
75 0 1 unless $self->{'socket'} ||= Net::EmptyPort::listen_socket({'host', $self->{'host'}, 'proto', $self->{'proto'}})
82 18 2 if $self->{'auto_start'}
92 0 18 unless defined $pid
94 15 3 if ($pid) { }
97 14 1 unless $self->{'socket'}
102 1 1 if (kill 0, $self->{'_my_pid'})
112 5 15 unless defined $self->{'pid'}
113 1 14 unless $self->{'_my_pid'} == $$
124 0 14 if $^O eq 'MSWin32'
128 0 14 if $^O eq 'MSWin32'
134 27 0 if ($^O ne 'MSWin32')
135 12 15 if (POSIX::WIFSIGNALED($?))
137 1 11 if ($signame =~ /^(ABRT|PIPE)$/)
142 14 13 if ($kid == 0 or $kid == -1)