Branch Coverage

blib/lib/File/KDBX.pm
Criterion Covered Total %
branch 215 390 55.1


line true false branch
33 0 0 if @_ == 1 and &blessed($_[0]) and $_[0]->isa($class)
37 59 0 if empty($self)
41 56 0 if not &in_global_destruction()
108 30 0 unless ref $self
121 0 15 unless ref $self
132 0 156 unless &Scalar::Util::blessed($_[0])
133 30 126 if $#_
0 177 unless &Scalar::Util::blessed($_[0])
134 30 147 if $#_
0 605 unless &Scalar::Util::blessed($_[0])
135 38 567 if $#_
0 1978 unless &Scalar::Util::blessed($_[0])
136 0 1978 if $#_
0 412 unless &Scalar::Util::blessed($_[0])
137 0 412 if $#_
0 1870 unless &Scalar::Util::blessed($_[0])
138 0 1870 if $#_
0 106 unless &Scalar::Util::blessed($_[0])
139 12 94 if $#_
0 154 unless &Scalar::Util::blessed($_[0])
140 21 133 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
141 0 59 if $#_
143 0 59 unless &Scalar::Util::blessed($_[0])
144 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
145 0 59 if $#_
0 61 unless &Scalar::Util::blessed($_[0])
146 1 60 if $#_
0 73 unless &Scalar::Util::blessed($_[0])
147 14 59 if $#_
0 73 unless &Scalar::Util::blessed($_[0])
148 14 59 if $#_
0 73 unless &Scalar::Util::blessed($_[0])
149 14 59 if $#_
155 0 265 unless &Scalar::Util::blessed($_[0])
156 29 236 if $#_
163 0 59 unless &Scalar::Util::blessed($_[0])
164 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
165 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
166 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
167 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
168 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
169 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
170 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
171 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
172 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
173 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
174 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
175 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
176 0 59 if $#_
177 0 220 unless &Scalar::Util::blessed($_[0])
178 0 220 if $#_
0 66 unless &Scalar::Util::blessed($_[0])
179 2 64 if $#_
0 66 unless &Scalar::Util::blessed($_[0])
180 1 65 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
181 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
182 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
183 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
184 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
185 0 59 if $#_
0 61 unless &Scalar::Util::blessed($_[0])
186 0 61 if $#_
0 61 unless &Scalar::Util::blessed($_[0])
187 0 61 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
188 0 59 if $#_
191 0 59 unless &Scalar::Util::blessed($_[0])
192 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
193 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
194 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
195 0 59 if $#_
0 59 unless &Scalar::Util::blessed($_[0])
196 0 59 if $#_
216 0 384 if @_ == 1 and XXX
217 295 89 unless @_
222 0 89 if @_
232 0 119 if &any(sub { nonempty($_->{'last_modification_time'}); } , values %{$self->custom_data;})
236 2 117 if &any(sub { nonempty($_->{'name'} || nonempty($_->{'last_modification_time'})); } , @{$self->custom_icons;})
242 3 114 if $self->groups->next(sub { nonempty($_->previous_parent_group || nonempty($_->tags || &any(sub { nonempty($_->{'last_modification_time'}); } , values %{$_->custom_data;}))); } )
248 3 111 if $self->entries("history", 1)->next(sub { nonempty($_->previous_parent_group || defined $_->quality_check && !$_->quality_check || &any(sub { nonempty($_->{'last_modification_time'}); } , values %{$_->custom_data;})); } )
250 10 101 if $self->kdf->uuid ne "\311\331\363\232b\212D`\277t\r\b\301\212O\352"
252 4 97 if nonempty($self->public_custom_data)
256 11 86 if $self->objects->next(sub { nonempty($_->custom_data); } )
266 21 643 if (@_)
279 0 0 unless $self->{'root'}
280 0 0 $self->_has_implicit_root ? :
304 59 3 ref $self ? :
324 123 90 unless @lineage
325 0 213 unless my $base = $lineage[-1]
328 1 212 if &any(sub { $_->uuid eq $uuid; } , @{$base->groups;}, @{$base->entries;})
332 0 90 if $result
339 0 6 if (my $group = shift())
345 5 1 if $uuid ne "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
346 1 5 if (not $group and $self->recycle_bin_enabled)
361 0 0 if (my $group = shift())
366 0 0 if $uuid eq "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
373 0 0 if (my $group = shift())
378 0 0 if $uuid eq "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
385 0 0 if (my $group = shift())
390 0 0 if $uuid eq "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
399 0 15 @_ % 2 == 1 ? :
404 0 15 unless ref $parent
405 0 15 unless $parent
407 0 15 defined $group ? :
420 133 0 @_ % 2 == 0 ? :
431 1 19 @_ % 2 == 1 ? :
436 0 20 unless ref $parent
437 0 20 unless $parent
439 1 19 defined $entry ? :
452 204 0 @_ % 2 == 0 ? :
463 106 0 @_ % 2 == 0 ? :
476 0 0 @_ % 2 == 1 ? :
0 0 @_ == 2 ? :
479 0 0 unless ($args{'uuid'} or $args{'data'})
482 0 0 if (@other_keys == 1)
488 0 0 unless my $uuid = $args{'uuid'}
495 0 0 if XXX
507 0 4 unless my $icon = &first(sub { $_->{'uuid'} eq $uuid; } , @{$self->custom_icons;})
514 9 0 @_ % 2 == 1 ? :
516 0 9 unless defined $args{'data'}
532 5 7 $_->{'uuid'} eq $uuid ? :
534 5 0 if @deleted
543 0 120 if @_ == 1 and XXX
544 119 1 unless @_
546 0 0 @_ % 2 == 1 ? :
1 0 @_ == 2 ? :
549 0 0 unless ($args{'key'} or $args{'value'})
552 0 0 if (@other_keys == 1)
558 0 1 unless my $key = $args{'key'}
560 0 1 if XXX
578 0 172 if @_ == 1 and XXX
579 172 0 unless @_
581 0 0 unless my $key = shift()
582 0 0 if @_
610 0 11 if $uuid eq "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" or $uuid eq "0000000000000000"
640 17 1 unless (defined $text)
644 0 17 unless $wanted and $search_in and nonempty($text)
655 0 17 unless $wanted = $fields{$wanted}
656 0 17 unless $search_in = $fields{$search_in}
658 9 8 $search_in eq 'uuid' ? :
662 2 15 unless $entry
747 12 38 if @_
756 0 0 if $self->_safe
772 15 4 unless my $safe = $self->_safe
782 0 15 unless defined wantarray
784 15 0 unless $self->is_locked
795 0 4 unless my $safe = $self->_safe
854 1 2 if (my $other = $seen{$digest}) { }
907 36 0 if @_
921 0 173 @_ % 2 == 1 ? :
927 0 173 unless $params
929 0 173 if (empty($params || !defined($params->{'$UUID'})))
932 155 18 if ($params->{'$UUID'} eq "\311\331\363\232b\212D`\277t\r\b\301\212O\352")
937 19 136 if ($self->version >= 262144)
951 14 67 if @_
959 0 67 if @_
991 8 77 if @_
995 59 0 $version < 262144 ? :
1001 22 85 if (@_)
1028 0 68 unless my $handler = $handlers{$type}
1044 0 6 if $old_uuid eq ($meta->{'recycle_bin_uuid'} // "")
1045 0 6 if $old_uuid eq ($meta->{'entry_templates_group'} // "")
1046 0 6 if $old_uuid eq ($meta->{'last_selected_group'} // "")
1047 0 6 if $old_uuid eq ($meta->{'last_top_visible_group'} // "")
1063 0 26 if $old_uuid eq ($_->{'previous_parent_group'} // "")
1066 129 1 unless defined $string->{'value'} and $string->{'value'} =~ /$fieldref_match/
1081 0 1 if $old_uuid eq ($meta->{'recycle_bin_uuid'} // "")
1082 0 1 if $old_uuid eq ($meta->{'entry_templates_group'} // "")
1083 0 1 if $old_uuid eq ($meta->{'last_selected_group'} // "")
1084 0 1 if $old_uuid eq ($meta->{'last_top_visible_group'} // "")
1087 0 2 if $old_uuid eq ($_->{'last_top_visible_entry'} // "")
1088 0 2 if $old_uuid eq ($_->{'previous_parent_group'} // "")
1091 0 3 if $old_uuid eq ($_->{'previous_parent_group'} // "")