Branch Coverage

blib/lib/IO/Async/OS.pm
Criterion Covered Total %
branch 73 104 70.1


line true false branch
126 50 102 unless defined $name
128 54 48 if $name =~ /^\d+$/
130 41 7 if $name eq 'inet'
131 2 5 if $name eq 'inet6' and defined &IO::Async::OS::_Base::AF_INET6
132 5 0 if $name eq 'unix'
152 49 114 unless defined $name
154 62 52 if $name =~ /^\d+$/
156 34 18 if $name eq 'stream'
157 18 0 if $name eq 'dgram'
158 0 0 if $name eq 'raw'
174 12 32 unless defined $HAVE_IO_SOCKET_IP
176 0 44 unless $family
183 24 20 unless defined $proto
185 42 2 if ($HAVE_IO_SOCKET_IP and $family == 2 || $family == 10)
196 2 0 if $sock
242 36 11 if defined $S1
244 0 11 unless $family == 2 and $socktype == 1 || $socktype == 2
248 0 11 unless my $Stmp = 'IO::Async::OS'->socket($family, $socktype)
249 0 11 unless $Stmp->bind(pack_sockaddr_in(0, "\177\000\000\cA"))
251 0 11 unless $S1 = 'IO::Async::OS'->socket($family, $socktype)
253 2 9 if ($socktype == 1) { }
254 0 2 unless $Stmp->listen(1)
255 0 2 unless $S1->connect(getsockname $Stmp)
256 0 2 unless $S2 = $Stmp->accept
266 0 9 unless $S1->connect(getsockname $S2)
267 0 9 unless $S2->connect(getsockname $S1)
285 0 801 unless pipe my $rd, my $wr
328 2 0 if (my($S1, $S2) = $self->socketpair)
333 0 0 unless my($rdA, $wrA) = $self->pipepair
334 0 0 unless my($rdB, $wrB) = $self->pipepair
359 58 0 if ($Config{'sig_name'} and $Config{'sig_num'}) { }
373 58 155 unless %sig_num
428 4 51 if (ref $ai eq 'ARRAY') { }
51 0 elsif (ref $ai eq 'HASH') { }
435 15 36 if (defined $ai[0] and not defined $ai[3])
438 1 14 unless my $code = $self->can($method)
442 1 13 if keys %$ai
454 15 38 unless defined $ai[3]
519 0 5 unless defined(my $path = delete $ai->{'path'})
552 2 3 if ($p_family == 2)
554 1 1 if $params[1] eq "\000\000\000\000"
557 2 1 if ($p_family == 10)
559 1 1 if $params[1] eq "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
595 0 59 unless my($reader, $sigpipe) = $self->pipepair
606 0 306 unless sysread $reader, my $buffer, 8192
608 311 0 if $sigwatch->{$signum}
621 3 67 unless exists $SIG{$signal}
622 0 67 unless ref $code
641 0 9 unless my $sigwatch = $loop->{'os'}{'sigwatch'}
667 2 0 if ($loop->{'os'}{'sigpipe'})
674 0 136 unless my $signum = $self->signame2num($signal)
675 134 2 unless my $code = $sigwatch->{$signum}