Branch Coverage

blib/lib/PerlIO/via/Timeout.pm
Criterion Covered Total %
branch 20 42 47.6


line true false branch
29 6 34 unless $_[0]
31 0 34 unless defined $fd and $fd >= 0
42 12 10 if wantarray
60 6 0 unless close $_[1]
78 1 0 if ($timeout_enabled and $read_timeout and $len and not _can_read_write($fh, $fd, $read_timeout, 0))
83 8 0 if (defined $r) { }
0 0 elsif ($! != 4) { }
84 0 8 unless $r
111 0 2 if ($len and $timeout_enabled and $write_timeout and not _can_read_write($fh, $fd, $write_timeout, 1))
116 3 0 if (defined $r) { }
0 0 elsif ($! != 4) { }
119 3 0 unless $len
138 0 1 if ($type) { }
145 0 1 if ($nfound == -1)
146 0 0 unless $! == 4
148 0 0 if not $timeout or ($pending = $timeout - (&Time::HiRes::time() - $initial)) > 0
161 2 3 if @_ > 1
168 0 3 if @_ > 1
174 0 2 if grep {$_[0]{$_} < 0;} 'read_timeout', 'write_timeout'
187 1 1 if @_ > 1
193 0 0 unless defined(my $fd = _get_fd($_[0]))