Branch Coverage

blib/lib/IO/Async/OS.pm
Criterion Covered Total %
branch 74 106 69.8


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\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 809 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 60 unless $Config::Config{'sig_name'} and $Config::Config{'sig_num'}
380 60 155 unless %sig_name2num
390 0 1 unless %sig_num2name
445 4 51 if (ref $ai eq 'ARRAY') { }
51 0 elsif (ref $ai eq 'HASH') { }
452 15 36 if (defined $ai[0] and not defined $ai[3])
455 1 14 unless my $code = $self->can($method)
459 1 13 if keys %$ai
471 15 38 unless defined $ai[3]
536 0 5 unless defined(my $path = delete $ai->{'path'})
569 2 3 if ($p_family == 2)
571 1 1 if $params[1] eq "\0\0\0\0"
574 2 1 if ($p_family == 10)
576 1 1 if $params[1] eq "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
612 0 61 unless my($reader, $sigpipe) = $self->pipepair
623 0 315 unless sysread $reader, my $buffer, 8192
625 324 0 if $sigwatch->{$signum}
638 3 69 unless exists $SIG{$signal}
639 0 69 unless ref $code
658 0 9 unless my $sigwatch = $loop->{'os'}{'sigwatch'}
684 2 0 if ($loop->{'os'}{'sigpipe'})
691 0 136 unless my $signum = $self->signame2num($signal)
692 134 2 unless my $code = $sigwatch->{$signum}