Branch Coverage

blib/lib/File/KDBX/Dumper/V4.pm
Criterion Covered Total %
branch 57 106 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)
242 7 0 if ($compress == 1) { }
0 0 elsif ($compress != 0) { }
244 0 7 unless $fh = "IO::Compress::Gzip"->new($fh, "-Level", IO::Compress::Gzip::Z_BEST_COMPRESSION(), "-TextFlag", 1)
271 0 14 unless defined $headers->{$type}
287 0 21 unless $fh->print($buf)
290 7 14 if ($type == 0) { }
7 7 elsif ($type == 1) { }
7 0 elsif ($type == 2) { }
0 0 elsif ($type == 3) { }
304 0 21 unless $fh->print($buf)
305 0 21 unless $fh->print($val)
321 0 0 if (defined $binary->{'ref'} and defined $kdbx->binaries->{$binary->{'ref'}})
325 0 0 unless (defined $binary->{'value'})
331 0 0 if (defined $written->{$hash}) { }
336 0 0 if $binary->{'protect'}
352 0 0 unless $fh->print($buf)
355 0 0 unless $fh->print($buf)
358 0 0 unless $fh->print($buf)
360 0 0 unless $fh->print($$data)