Condition Coverage

blib/lib/File/KDBX/Entry.pm
Criterion Covered Total %
condition 123 198 62.1


and 3 conditions

line !l l&&!r l&&r condition
40 86 0 13 defined $old_uuid and $self->is_current
133 541 312 426 not exists $self->{'strings'}{$key} and $STANDARD_STRINGS{$key}
248 0 0 0 XXX && exists $association->{'keystroke_sequence'}
279 0 0 0 defined $args{'value'} && utf8::is_utf8($args{'value'})
301 0 0 27 defined $params{'type'} and defined $params{'secret'}
322 0 0 10 defined $params{'type'} and defined $params{'secret'}
358 9 2 9 defined $params{'algorithm'} and $params{'algorithm'} eq "sha1"
359 9 2 9 defined $params{'period'} and $params{'period'} == 30
360 0 4 16 defined $params{'digits'} and $params{'digits'} == 6
361 13 2 5 defined $params{'counter'} and $params{'counter'} == 0
431 0 0 22 $params{'secret'} and $params{'type'}
523 252 28 4 @$entries and not &blessed($entries->[0])
550 0 2 0 0 <= $max_items and $max_items < @$history

or 2 conditions

line l !l condition
46 10 89 $_[0]{'custom_icon_uuid'} //= undef
51 432 85 $_[0]{'auto_type'} //= scalar &$default($_[0])
52 2 112 $_[0]{'previous_parent_group'} //= undef
54 138 0 $_[0]{'strings'} //= scalar &$default($_[0])
55 51 85 $_[0]{'binaries'} //= scalar &$default($_[0])
56 643 85 $_[0]{'times'} //= scalar &$default($_[0])
60 17 84 $_[0]->times->{'last_modification_time'} //= scalar &$default($_[0])
61 3 85 $_[0]->times->{'creation_time'} //= scalar &$default($_[0])
62 8 85 $_[0]->times->{'last_access_time'} //= scalar &$default($_[0])
63 0 85 $_[0]->times->{'expiry_time'} //= scalar &$default($_[0])
66 1 85 $_[0]->times->{'location_changed'} //= scalar &$default($_[0])
73 3 85 $_[0]->auto_type->{'associations'} //= scalar &$default($_[0])
134 76 350 $args{'value'} //= ""
160 614 276 $self->string(@_) // (return undef)
210 323 0 $self->string_peek(@_) // (return undef)
218 0 5 shift() // "\n"
289 4 0 $self->binary(@_) // (return undef)
380 4 32 $self->expand_title || 'KDBX'
4 32 $self->expand_username || 'none'
22 14 $self->string_value("HmacOtp-Counter") // 0
411 2 19 $self->expand_title || 'KDBX'
2 19 $self->expand_username || 'none'
2 19 $self->string_value("TimeOtp-Length") // 6
2 19 $algorithms{$self->string_value('TimeOtp-Algorithm') or ''} || 'sha1'
2 19 $self->string_value("TimeOtp-Period") // 30
428 22 0 $self->string_value('otp') || ''
433 2 20 $params{'encoder'} // ""
439 22 0 $params{'label'} // ":"
451 57 0 shift() // (return ())
470 20 7 (shift() // $self->string_value('HmacOtp-Counter')) || 0
487 3 0 $self->tags // ""
492 15 0 $string->{'value'} // ""
498 0 0 $item->{'value'} // ""
512 0 0 $association->{'keystroke_sequence'} // ""
522 188 96 $self->{'history'} //= []
541 2 0 ($args{'max_items'} // eval { do { $self->kdbx->history_max_items } }) // 10
542 2 0 ($args{'max_size'} // eval { do { $self->kdbx->history_max_size } }) // 6291456
543 2 0 ($args{'max_age'} // eval { do { $self->kdbx->maintenance_history_days } }) // 365
579 7 1 $self->{'history'} //= []

or 3 conditions

line l !l&&r !l&&!r condition
33 13 86 356 @_ or not defined $self->{'uuid'}
36 13 86 0 delete $args{'uuid'} // generate_uuid()
45 134 49 0 $_[0]{'icon_id'} //= $default
47 0 0 85 $_[0]{'foreground_color'} //= $default
48 0 0 85 $_[0]{'background_color'} //= $default
49 0 0 85 $_[0]{'override_url'} //= $default
50 3 0 85 $_[0]{'tags'} //= $default
53 51 88 0 $_[0]{'quality_check'} //= $default
64 0 0 85 $_[0]->times->{'expires'} //= $default
65 0 0 85 $_[0]->times->{'usage_count'} //= $default
69 0 0 85 $_[0]->auto_type->{'data_transfer_obfuscation'} //= $default
71 0 85 0 $_[0]->auto_type->{'default_sequence'} //= $default
119 1278 0 1 defined $args{'key'} or defined $args{'value'}
135 0 85 0 $args{'protect'} //= &true()
180 19 23 0 $PLACEHOLDERS{$local_key} // do { next unless my $handler = $File::KDBX::PLACEHOLDERS{$placeholder_key}; memoize(recurse_limit($handler, $PLACEHOLDER_MAX_DEPTH, sub { alert("Detected deep recursion while expanding $placeholder placeholder", "placeholder", $placeholder); return; } )) }
199 41 3 0 &$expand(uc $1, $2, @_) // $&
203 2 0 0 &$expand("ENV", $1, @_) // $&
266 7 0 1 defined $args{'key'} or defined $args{'value'}
353 8 12 0 $label //= "${issuer}:$account"
391 0 0 12 not $otp_params{'secret'} or $otp_params{'type'} ne "hotp"
418 0 0 10 not $otp_params{'secret'} or $otp_params{'type'} ne "totp"
440 20 2 0 $params{'issuer'} //= uri_unescape_utf8($issuer)
441 0 22 0 $params{'account'} //= uri_unescape_utf8($user)
541 2 0 0 $args{'max_items'} // eval { do { $self->kdbx->history_max_items } }
542 2 0 0 $args{'max_size'} // eval { do { $self->kdbx->history_max_size } }
543 2 0 0 $args{'max_age'} // eval { do { $self->kdbx->maintenance_history_days } }
642 0 85 0 $self->auto_type->{'enabled'} //= &true()