Branch Coverage

blib/lib/GnuPG/Tie.pm
Criterion Covered Total %
branch 42 72 58.3


line true false branch
42 0 18 unless pipe $gpg_in, $tie_out
44 0 18 unless pipe $tie_in, $gpg_out
57 0 72 unless fcntl $fd, 2, 0
63 0 36 unless my $flags = fcntl($fd, 3, 0)
65 0 36 unless fcntl $fd, 4, $flags | 2048
97 0 50 unless defined $self->{'writer'}
99 0 50 if $self->{'done_writing'}
109 0 50 unless defined $nfound
112 50 0 if (vec $w_out, fileno $self->{'writer'}, 1)
114 0 50 unless defined $n
119 0 50 if (vec $r_out, fileno $self->{'reader'}, 1)
122 0 0 unless defined $n
135 14 14 unless ($self->{'done_writing'})
138 0 14 unless close $self->{'writer'}
150 0 28 unless defined $self->{'reader'}
152 0 28 if ($self->{'eof'})
158 14 14 unless $self->{'done_writing'}
161 0 28 if ($self->{'len'} - $self->{'offset'})
163 0 0 $left > $len ? :
169 0 0 if $n == $len
179 0 28 unless defined $nfound
182 0 28 unless defined $n
190 0 50 defined $, ? :
210 0 0 unless $n
215 2 66 wantarray ? :
224 0 14 unless close $self->{'reader'}
251 2 72 if ($self->{'eof'})
258 3 69 unless (defined $/)
268 63 6 if ($/ ne '') { }
272 54 18 if (length $buf != 0)
274 54 0 if (($i = index($buf, $/)) != -1)
284 9 9 if ($n == 0)
287 9 0 length $buf == 0 ? :
294 4 4 if ($buf =~ /(\r\n\r\n+|\n\n+)/s)
302 2 2 if ($n == 0)
305 0 2 length $buf == 0 ? :