Branch Coverage

blib/lib/File/KDBX/Loader/XML.pm
Criterion Covered Total %
branch 84 136 61.7


line true false branch
20 0 2686 unless &Scalar::Util::blessed($_[0])
21 0 39 unless &Scalar::Util::blessed($_[0])
44 0 42 if $reader->nodeType != 1
46 21 21 if ($name eq 'Meta') { }
21 0 elsif ($name eq 'Root') { }
50 0 21 if ($root_done)
59 0 21 if ($reader->readState == 6)
63 12 9 if $self->{'_safe'}
128 0 2 $protected ? :
133 0 2 if ($protected) { }
0 2 elsif ($compressed) { }
135 0 0 $compressed ? :
191 21 0 if $root->{'group'}
244 0 18 unless $entry->{'strings'}
250 0 18 unless $entry->{'binaries'}
284 27 68 $protected ? :
286 27 68 $protect ? :
291 27 68 if $protected
311 4 3 if (defined $ref) { }
316 0 3 if $protected
318 0 3 if ($protected) { }
0 3 elsif ($compressed) { }
320 0 0 $compressed ? :
376 0 4 if defined $binary->{'value'}
379 0 4 unless (defined $data and defined $data->{'value'})
384 0 4 if $data->{'protect'}
394 132 315 @_ % 2 == 1 ? :
401 72 375 if $reader->isEmptyElement
406 0 2335 if (ref $args->{$key} eq 'HASH') { }
157 2178 elsif (ref $args->{$key} eq 'ARRAY') { }
413 0 2178 if exists $args->{$key}
420 4 0 ref $args eq 'ARRAY' ? :
371 4 ref $args eq 'HASH' ? :
0 375 ref $args eq 'CODE' ? :
424 375 4022 if $reader->nodePath eq $path and $reader->nodeType == 15
425 1669 2353 if $reader->nodeType != 1
430 157 2196 if ref $type eq "ARRAY"
432 0 2353 unless (defined $type)
433 0 0 unless exists $spec{$name}
439 509 1844 if (ref $type eq 'CODE') { }
441 26 483 if (@result == 2) { }
471 12 elsif (@result == 1) { }
463 145 72 unless $reader->hasAttributes
466 39 33 unless (defined $value)
475 39 33 unless defined $value
478 0 33 if (my $err = $@)
479 0 0 if ref $err
491 1669 275 unless $reader->isEmptyElement
492 275 1669 unless $reader->hasValue
497 0 1669 if (my $err = $@)
498 0 0 if ref $err
511 0 246 if not defined $_ or ref $_ and not defined $$_
512 0 246 ref $_ ? :
515 0 246 if $err
521 139 157 if /^True$/i
522 157 0 if /^False$/i
523 0 0 if length $_ == 0
530 131 370 if (m[^[A-Za-z0-9\+/\=]+$])
532 0 131 if (my $err = $@)
535 0 131 if $@
536 0 131 if length $binary < 8
543 0 370 if (my $err = $@)
551 106 0 if /^null$/i
553 0 0 if $@
560 0 257 unless &looks_like_number($_)
566 0 553 unless defined $_
573 0 207 if $@
574 0 207 unless length $uuid == 16