Branch Coverage

blib/lib/File/KDBX/Loader.pm
Criterion Covered Total %
branch 34 70 48.5


line true false branch
45 21 30 if (defined $format) { }
0 30 elsif (defined $sig2 and $sig2 == 3041655653) { }
30 0 elsif (&looks_like_number($version)) { }
58 0 30 unless $subclass = $subclasses{$major}
80 0 9 if &openhandle($src) or $src eq "-"
81 0 9 if XXX
82 9 0 if not XXX and defined $src
89 0 21 unless my $str = shift()
90 0 21 @_ % 2 == 0 ? :
95 3 18 XXX ? :
97 0 21 unless open my $fh, "<", $ref
99 0 21 unless ref $self
108 0 9 @_ % 2 == 0 ? :
113 0 9 unless open my $fh, "<:raw", $filepath
115 0 9 unless ref $self
124 0 0 @_ % 2 == 0 ? :
126 0 0 if $fh eq "-"
131 0 0 unless ref $self
139 0 346 unless ref $self
140 0 346 if @_
142 0 30 unless &Scalar::Util::blessed($_[0])
143 0 21 unless &Scalar::Util::blessed($_[0])
154 0 30 unless &read_all($fh, my $magic, 12)
158 30 0 if ($kdbx)
162 30 0 if ref $self
165 0 30 wantarray ? :
168 0 0 unless $_[0]{'fh'}
176 0 0 $kdbx->key ? :
179 0 30 unless &read_all($fh, my $buf, 1)
182 0 30 if ($first != 3)
188 0 30 unless $kdbx->sig1 == 2594363651
190 30 0 if (ref($self) =~ /::(?:KDB|V[34])$/)
191 0 30 unless defined $key
199 10 20 if (my $err = $@)
218 30 217 if $type == "end"