Branch Coverage

blib/lib/File/KDBX/Dumper/V4.pm
Criterion Covered Total %
branch 58 108 53.7


line true false branch
21 0 7 unless &Scalar::Util::blessed($_[0])
36 0 7 if $headers->{'kdf_parameters'}{'$UUID'} eq "|\2\273\202y\247J\300\222}\21J\0d\2028"
38 0 7 if (nonempty(my $comment = $headers->{'comment'}))
48 0 35 unless defined $headers->{$type}
52 2 5 if defined $headers->{'public_custom_data'} and keys %{$$headers{"public_custom_data"};}
65 7 37 if ($type == 0) { }
0 37 elsif ($type == 1) { }
7 30 elsif ($type == 2) { }
7 23 elsif ($type == 3) { }
7 16 elsif ($type == 4) { }
7 9 elsif ($type == 7) { }
7 2 elsif ($type == 11) { }
2 0 elsif ($type == 12) { }
0 0 elsif ($type == 10 or $type == 8 or $type == 5 or $type == 6 or $type == 9) { }
0 0 elsif ($type == 1) { }
73 0 7 unless $size == 16
80 0 7 unless $size == 32
119 0 44 unless $fh->print($buf, $val)
128 1 4 if (&isBoolean($variant)) { }
1 3 elsif (&looks_like_number($variant) and ($variant + 0) =~ /^\d+$/) { }
1 2 elsif (&is_utf8($variant)) { }
134 0 1 if $b[0] and $neg
135 0 1 if $b[0]
136 0 1 if $neg
160 5 27 if ($type == 4) { }
9 18 elsif ($type == 5) { }
1 17 elsif ($type == 8) { }
0 17 elsif ($type == 12) { }
0 17 elsif ($type == 13) { }
1 16 elsif ($type == 24) { }
16 0 elsif ($type == 66) { }
208 0 21 unless defined $kdbx->headers->{$field}
215 0 7 unless $fh->print($header_hash)
228 0 7 unless $fh->print($header_hmac)
243 0 7 if $got_iv_size != $iv_size
248 7 0 if ($compress == 1) { }
0 0 elsif ($compress != 0) { }
250 0 7 unless $fh = "IO::Compress::Gzip"->new($fh, "-Level", IO::Compress::Gzip::Z_BEST_COMPRESSION(), "-TextFlag", 1)
277 0 14 unless defined $headers->{$type}
293 0 21 unless $fh->print($buf)
296 7 14 if ($type == 0) { }
7 7 elsif ($type == 1) { }
7 0 elsif ($type == 2) { }
0 0 elsif ($type == 3) { }
310 0 21 unless $fh->print($buf)
311 0 21 unless $fh->print($val)
327 0 0 if (defined $binary->{'ref'} and defined $kdbx->binaries->{$binary->{'ref'}})
331 0 0 unless (defined $binary->{'value'})
337 0 0 if (defined $written->{$hash}) { }
342 0 0 if $binary->{'protect'}
358 0 0 unless $fh->print($buf)
361 0 0 unless $fh->print($buf)
364 0 0 unless $fh->print($buf)
366 0 0 unless $fh->print($$data)