Branch Coverage

blib/lib/File/KDBX/IO/Crypt.pm
Criterion Covered Total %
branch 34 54 62.9


line true false branch
26 79 162 if @_
27 0 56 ref $default eq 'CODE' ? :
34 44 0 @_ % 2 == 1 ? :
36 0 44 unless $self->_fh($args{'fh'})
37 0 44 unless $self->cipher($args{'cipher'})
44 0 65 if $ENV{'DEBUG_STREAM'}
45 21 44 unless my $cipher = $self->cipher
48 27 17 if (0 < length $buf)
50 0 27 if (my $err = $@)
54 26 1 if 0 < length $plaintext
59 1 17 if (my $err = $@)
70 0 80 if $ENV{'DEBUG_STREAM'}
71 0 80 unless my $cipher = $self->cipher
74 0 80 if (my $err = $@)
78 76 4 if nonempty($new_data)
85 0 44 if $ENV{'DEBUG_STREAM'}
86 27 17 if $self->_mode ne "w"
87 0 17 unless my $cipher = $self->cipher
90 0 17 if (my $err = $@)
94 2 15 if nonempty($new_data)
103 0 17 if $ENV{'DEBUG_STREAM'}
104 0 17 if $self->_mode ne "w"
109 0 78 if empty($read)
110 0 78 unless $fh->print($read)
117 0 1 if $ENV{'DEBUG_STREAM'}
118 1 0 if (exists &Errno::EPROTO) { }
0 0 elsif (exists &Errno::EIO) { }