Branch Coverage

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


line true false branch
26 83 173 if @_
27 0 67 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 76 if $ENV{'DEBUG_STREAM'}
45 28 48 unless my $cipher = $self->cipher
48 27 21 if (0 < length $buf)
50 0 27 if (my $err = $@)
54 26 1 if 0 < length $plaintext
59 1 21 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 47 33 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 16 1 if nonempty($new_data)
103 0 17 if $ENV{'DEBUG_STREAM'}
104 0 17 if $self->_mode ne "w"
109 0 63 if empty($read)
110 0 63 unless $fh->print($read)
117 0 1 if $ENV{'DEBUG_STREAM'}
118 1 0 if (exists &Errno::EPROTO) { }
0 0 elsif (exists &Errno::EIO) { }