Branch Coverage

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


line true false branch
126 54 102 unless defined $name
128 54 48 if $name =~ /^\d+$/u
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 53 114 unless defined $name
154 62 52 if $name =~ /^\d+$/u
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
185 42 2 if ($HAVE_IO_SOCKET_IP and $family == 2 || $family == 10)
196 2 0 if $sock
242 40 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\0\0\1"))
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
366 0 58 unless $Config::Config{'sig_name'} and $Config::Config{'sig_num'}
382 58 154 unless %sig_name2num
392 0 2 unless %sig_num2name
447 4 51 if (ref $ai eq 'ARRAY') { }
51 0 elsif (ref $ai eq 'HASH') { }
454 15 36 if (defined $ai[0] and not defined $ai[3])
457 1 14 unless my $code = $self->can($method)
461 1 13 if keys %$ai
473 15 38 unless defined $ai[3]
538 0 5 unless defined(my $path = delete $ai->{'path'})
571 2 3 if ($p_family == 2)
573 1 1 if $params[1] eq "\0\0\0\0"
576 2 1 if ($p_family == 10)
578 1 1 if $params[1] eq "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
614 0 59 unless my($reader, $sigpipe) = $self->pipepair
625 0 326 unless sysread $reader, my $buffer, 8192
627 330 0 if $sigwatch->{$signum}
640 3 67 unless exists $SIG{$signal}
641 0 67 unless ref $code
660 0 9 unless my $sigwatch = $loop->{'os'}{'sigwatch'}
686 2 4 if ($loop->{'os'}{'sigpipe'})
693 0 134 unless my $signum = $self->signame2num($signal)
694 132 2 unless my $code = $sigwatch->{$signum}