Condition Coverage

blib/lib/File/KeePass/KDBX.pm
Criterion Covered Total %
condition 55 113 48.6


and 3 conditions

line !l l&&!r l&&r condition
34 6 3 0 @_ == 1 and (&blessed($_[0]) // "") eq "File::KeePass::KDBX"
36 6 3 0 @_ == 1 and &blessed($_[0])
9 0 0 @_ == 1 and &blessed($_[0]) and $_[0]->isa("File::KeePass")
40 6 3 0 @_ == 1 and &blessed($_[0])
9 0 0 @_ == 1 and &blessed($_[0]) and $_[0]->isa("File::KDBX")
202 6 0 0 $head and $head->{'reuse_header'}
218 7 1 0 $head and $head->{'reuse_header'}
238 0 14 0 $reuse and $reuse < 0
311 236 29 38 @tests and grep {not &$_($g);} @tests
351 2 0 5 not $parent and $self->kdbx->_has_implicit_root
367 10 22 16 @tests and grep {not &$_($e);} @tests
409 0 2 2 defined $_[0]{$field} && $_[0]{$field} =~ /$args->{$key}/
436 0 0 0 defined $id and length $id
517 0 0 0 length $_ != 16 and &looks_like_number($_)

or 2 conditions

line l !l condition
34 0 3 &blessed($_[0]) // ""
120 0 2 shift() || {}
226 1 13 shift() || {}
234 14 0 $self->header || {}
237 0 0 $head->{'version'} || '1'
302 150 153 $level || 0
304 303 0 $g->{'icon'} ||= 0
453 10 4 $self->{'auto_lock'} //= 1
483 1260 0 shift() // \my %h
487 1249 11 $TIED{$self} //= {}
515 0 0 shift() // (return)
523 0 0 shift() // (return)
529 0 0 shift() // (return)

or 3 conditions

line l !l&&r !l&&!r condition
95 409 11 0 $KDBX{$self} //= "File::KDBX"->new
158 0 0 0 $sig2 == 3041655653 or $version < 131072
228 1 13 0 $head->{'version'} || $self->header->{'version'}
232 0 14 0 $head->{'reuse_header'} || !exists $head->{'reuse_header'} && ($self->{'reuse_header'} || !exists $self->{'reuse_header'})
237 14 0 0 $v ||= $head->{'version'} || '1'
253 24 8 0 $self->{'header'} //= $self->_tie({}, "Header", $self->kdbx)
260 65 10 0 $self->{'groups'} //= $self->_tie([], "GroupList", $self->kdbx)
286 0 35 0 $group->{'expires'} //= $self->default_exp
300 366 73 0 $groups || $self->groups
308 0 0 303 not defined $g->{'id'} or $uniq{$g->{'id'}}++
348 2 5 0 $entry->{'expires'} //= $self->default_exp
412 79 12 32 !$op || $op eq '='
424 0 2 0 $time || time
437 0 0 0 $uniq->{$id} ||= do { if (length $id != 16) { $id = substr($self->encode_base64($id), 0, 16) if not $id =~ /^\d+$/ or $id > 4294967295; $id = sprintf("%016s", $id) if $id ne 0; } ; $id = $self->gen_uuid while $uniq->{$id}++; $id }
439 0 0 0 not $id =~ /^\d+$/ or $id > 4294967295