Condition Coverage

blib/lib/File/KDBX/Entry.pm
Criterion Covered Total %
condition 117 192 60.9


and 3 conditions

line !l l&&!r l&&r condition
40 85 0 13 defined $old_uuid and $self->is_current
246 0 0 0 XXX && exists $association->{'keystroke_sequence'}
277 0 0 0 defined $args{'value'} && utf8::is_utf8($args{'value'})
299 0 0 27 defined $params{'type'} and defined $params{'secret'}
320 0 0 10 defined $params{'type'} and defined $params{'secret'}
356 9 2 9 defined $params{'algorithm'} and $params{'algorithm'} eq "sha1"
357 9 2 9 defined $params{'period'} and $params{'period'} == 30
358 0 4 16 defined $params{'digits'} and $params{'digits'} == 6
359 13 2 5 defined $params{'counter'} and $params{'counter'} == 0
429 0 0 22 $params{'secret'} and $params{'type'}
521 248 28 4 @$entries and not &blessed($entries->[0])
548 0 2 0 0 <= $max_items and $max_items < @$history

or 2 conditions

line l !l condition
46 10 88 $_[0]{'custom_icon_uuid'} //= undef
51 427 84 $_[0]{'auto_type'} //= scalar &$default($_[0])
52 2 111 $_[0]{'previous_parent_group'} //= undef
54 134 0 $_[0]{'strings'} //= scalar &$default($_[0])
55 50 84 $_[0]{'binaries'} //= scalar &$default($_[0])
56 636 84 $_[0]{'times'} //= scalar &$default($_[0])
60 17 83 $_[0]->times->{'last_modification_time'} //= scalar &$default($_[0])
61 3 84 $_[0]->times->{'creation_time'} //= scalar &$default($_[0])
62 8 84 $_[0]->times->{'last_access_time'} //= scalar &$default($_[0])
63 0 84 $_[0]->times->{'expiry_time'} //= scalar &$default($_[0])
66 1 84 $_[0]->times->{'location_changed'} //= scalar &$default($_[0])
73 3 84 $_[0]->auto_type->{'associations'} //= scalar &$default($_[0])
138 461 348 $self->{'strings'}{$key} //= {"value", "", $self->_protect($key) ? ("protect", &true()) : ()}
158 599 276 $self->string(@_) // (return undef)
208 323 0 $self->string_peek(@_) // (return undef)
216 0 5 shift() // "\n"
287 1 0 $self->binary(@_) // (return undef)
378 4 32 $self->expand_title || 'KDBX'
4 32 $self->expand_username || 'none'
22 14 $self->string_value("HmacOtp-Counter") // 0
409 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
426 22 0 $self->string_value('otp') || ''
431 2 20 $params{'encoder'} // ""
437 22 0 $params{'label'} // ":"
449 57 0 shift() // (return ())
468 20 7 (shift() // $self->string_value('HmacOtp-Counter')) || 0
485 3 0 $self->tags // ""
490 15 0 $string->{'value'} // ""
496 0 0 $item->{'value'} // ""
510 0 0 $association->{'keystroke_sequence'} // ""
520 185 95 $self->{'history'} //= []
539 2 0 ($args{'max_items'} // eval { do { $self->kdbx->history_max_items } }) // 10
540 2 0 ($args{'max_size'} // eval { do { $self->kdbx->history_max_size } }) // 6291456
541 2 0 ($args{'max_age'} // eval { do { $self->kdbx->maintenance_history_days } }) // 365
577 7 1 $self->{'history'} //= []

or 3 conditions

line l !l&&r !l&&!r condition
33 13 85 351 @_ or not defined $self->{'uuid'}
36 13 85 0 delete $args{'uuid'} // generate_uuid()
45 134 48 0 $_[0]{'icon_id'} //= $default
47 0 0 84 $_[0]{'foreground_color'} //= $default
48 0 0 84 $_[0]{'background_color'} //= $default
49 0 0 84 $_[0]{'override_url'} //= $default
50 3 0 84 $_[0]{'tags'} //= $default
53 51 87 0 $_[0]{'quality_check'} //= $default
64 0 0 84 $_[0]->times->{'expires'} //= $default
65 0 0 84 $_[0]->times->{'usage_count'} //= $default
69 0 0 84 $_[0]->auto_type->{'data_transfer_obfuscation'} //= $default
71 0 84 0 $_[0]->auto_type->{'default_sequence'} //= $default
119 1263 0 0 defined $args{'key'} or defined $args{'value'}
178 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; } )) }
197 41 3 0 &$expand(uc $1, $2, @_) // $&
201 2 0 0 &$expand("ENV", $1, @_) // $&
264 3 0 0 defined $args{'key'} or defined $args{'value'}
351 8 12 0 $label //= "${issuer}:$account"
389 0 0 12 not $otp_params{'secret'} or $otp_params{'type'} ne "hotp"
416 0 0 10 not $otp_params{'secret'} or $otp_params{'type'} ne "totp"
438 20 2 0 $params{'issuer'} //= uri_unescape_utf8($issuer)
439 0 22 0 $params{'account'} //= uri_unescape_utf8($user)
539 2 0 0 $args{'max_items'} // eval { do { $self->kdbx->history_max_items } }
540 2 0 0 $args{'max_size'} // eval { do { $self->kdbx->history_max_size } }
541 2 0 0 $args{'max_age'} // eval { do { $self->kdbx->maintenance_history_days } }
640 0 84 0 $self->auto_type->{'enabled'} //= &true()