Branch Coverage

blib/lib/File/KDBX.pm
Criterion Covered Total %
branch 225 398 56.5


line true false branch
33 0 0 if @_ == 1 and &blessed($_[0]) and $_[0]->isa($class)
36 0 62 if XXX
40 62 0 unless $data
44 59 0 if not &in_global_destruction()
111 30 0 unless ref $self
124 0 15 unless ref $self
135 0 159 unless &Scalar::Util::blessed($_[0])
136 30 129 if $#_
0 180 unless &Scalar::Util::blessed($_[0])
137 30 150 if $#_
0 751 unless &Scalar::Util::blessed($_[0])
138 39 712 if $#_
0 2153 unless &Scalar::Util::blessed($_[0])
139 0 2153 if $#_
0 424 unless &Scalar::Util::blessed($_[0])
140 0 424 if $#_
0 1974 unless &Scalar::Util::blessed($_[0])
141 0 1974 if $#_
0 109 unless &Scalar::Util::blessed($_[0])
142 12 97 if $#_
0 158 unless &Scalar::Util::blessed($_[0])
143 21 137 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
144 0 62 if $#_
146 0 62 unless &Scalar::Util::blessed($_[0])
147 0 62 if $#_
148 0 110 unless &Scalar::Util::blessed($_[0])
149 0 110 if $#_
0 64 unless &Scalar::Util::blessed($_[0])
150 1 63 if $#_
0 76 unless &Scalar::Util::blessed($_[0])
151 14 62 if $#_
152 0 124 unless &Scalar::Util::blessed($_[0])
153 14 110 if $#_
0 76 unless &Scalar::Util::blessed($_[0])
154 14 62 if $#_
160 0 350 unless &Scalar::Util::blessed($_[0])
161 30 320 if $#_
168 0 62 unless &Scalar::Util::blessed($_[0])
169 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
170 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
171 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
172 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
173 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
174 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
175 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
176 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
177 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
178 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
179 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
180 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
181 0 62 if $#_
182 0 226 unless &Scalar::Util::blessed($_[0])
183 0 226 if $#_
0 69 unless &Scalar::Util::blessed($_[0])
184 2 67 if $#_
0 69 unless &Scalar::Util::blessed($_[0])
185 1 68 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
186 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
187 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
188 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
189 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
190 0 62 if $#_
0 64 unless &Scalar::Util::blessed($_[0])
191 0 64 if $#_
0 64 unless &Scalar::Util::blessed($_[0])
192 0 64 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
193 0 62 if $#_
196 0 62 unless &Scalar::Util::blessed($_[0])
197 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
198 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
199 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
200 0 62 if $#_
0 62 unless &Scalar::Util::blessed($_[0])
201 0 62 if $#_
221 0 425 if @_ == 1 and XXX
222 310 115 unless @_
227 0 115 if @_
237 0 122 if &any(sub { nonempty($_->{'last_modification_time'}); } , values %{$self->custom_data;})
241 2 120 if &any(sub { nonempty($_->{'name'} || nonempty($_->{'last_modification_time'})); } , @{$self->custom_icons;})
247 3 117 if $self->groups->next(sub { nonempty($_->previous_parent_group || nonempty($_->tags || &any(sub { nonempty($_->{'last_modification_time'}); } , values %{$_->custom_data;}))); } )
253 3 114 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;})); } )
255 11 103 if $self->kdf->uuid ne "\311\331\363\232b\212D`\277t\r\b\301\212O\352"
257 4 99 if nonempty($self->public_custom_data)
261 11 88 if $self->objects->next(sub { nonempty($_->custom_data); } )
271 21 657 if (@_)
284 0 0 unless $self->{'root'}
285 0 0 $self->_has_implicit_root ? :
309 62 3 ref $self ? :
329 126 90 unless @lineage
330 0 216 unless my $base = $lineage[-1]
333 1 215 if &any(sub { $_->uuid eq $uuid; } , @{$base->groups;}, @{$base->entries;})
337 0 90 if $result
344 0 6 if (my $group = shift())
350 5 1 if $uuid ne "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
351 1 5 if (not $group and $self->recycle_bin_enabled)
366 0 0 if (my $group = shift())
371 0 0 if $uuid eq "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
378 0 0 if (my $group = shift())
383 0 0 if $uuid eq "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
390 0 0 if (my $group = shift())
395 0 0 if $uuid eq "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
404 0 15 @_ % 2 == 1 ? :
409 0 15 unless ref $parent
410 0 15 unless $parent
412 0 15 defined $group ? :
425 136 0 @_ % 2 == 0 ? :
436 1 19 @_ % 2 == 1 ? :
441 0 20 unless ref $parent
442 0 20 unless $parent
444 1 19 defined $entry ? :
457 209 0 @_ % 2 == 0 ? :
468 108 0 @_ % 2 == 0 ? :
481 0 0 @_ % 2 == 1 ? :
0 0 @_ == 2 ? :
484 0 0 unless ($args{'uuid'} or $args{'data'})
487 0 0 if (@other_keys == 1)
493 0 0 unless my $uuid = $args{'uuid'}
500 0 0 if XXX
512 0 4 unless my $icon = &first(sub { $_->{'uuid'} eq $uuid; } , @{$self->custom_icons;})
519 9 0 @_ % 2 == 1 ? :
521 0 9 unless defined $args{'data'}
537 5 7 $_->{'uuid'} eq $uuid ? :
539 5 0 if @deleted
548 0 123 if @_ == 1 and XXX
549 122 1 unless @_
551 0 0 @_ % 2 == 1 ? :
1 0 @_ == 2 ? :
554 0 0 unless ($args{'key'} or $args{'value'})
557 0 0 if (@other_keys == 1)
563 0 1 unless my $key = $args{'key'}
565 0 1 if XXX
583 0 177 if @_ == 1 and XXX
584 177 0 unless @_
586 0 0 unless my $key = shift()
587 0 0 if @_
615 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"
645 17 1 unless (defined $text)
649 0 17 unless $wanted and $search_in and nonempty($text)
660 0 17 unless $wanted = $fields{$wanted}
661 0 17 unless $search_in = $fields{$search_in}
663 9 8 $search_in eq 'uuid' ? :
667 2 15 unless $entry
752 13 41 if @_
767 2 4 if $string->{'protect'} // $self->memory_protection($string_key)
771 1 1 unless @strings
773 0 1 if (my $safe = $self->_safe) { }
785 16 5 unless my $safe = $self->_safe
795 0 15 unless defined wantarray
797 15 0 unless $self->is_locked
808 0 4 unless my $safe = $self->_safe
867 1 2 if (my $other = $seen{$digest}) { }
909 7 7 if 262144 <= $self->version
922 36 0 if @_
936 0 176 @_ % 2 == 1 ? :
941 0 176 unless $params
943 0 176 if (empty($params || !defined($params->{'$UUID'})))
946 158 18 if ($params->{'$UUID'} eq "\311\331\363\232b\212D`\277t\r\b\301\212O\352")
951 20 138 if ($self->version >= 262144)
966 14 71 if @_
977 2 73 if @_
1009 8 80 if @_
1013 61 1 $version < 262144 ? :
1019 22 88 if (@_)
1046 0 69 unless my $handler = $handlers{$type}
1062 0 6 if $old_uuid eq ($meta->{'recycle_bin_uuid'} // "")
1063 0 6 if $old_uuid eq ($meta->{'entry_templates_group'} // "")
1064 0 6 if $old_uuid eq ($meta->{'last_selected_group'} // "")
1065 0 6 if $old_uuid eq ($meta->{'last_top_visible_group'} // "")
1081 0 26 if $old_uuid eq ($_->{'previous_parent_group'} // "")
1084 129 1 unless defined $string->{'value'} and $string->{'value'} =~ /$fieldref_match/
1099 0 1 if $old_uuid eq ($meta->{'recycle_bin_uuid'} // "")
1100 0 1 if $old_uuid eq ($meta->{'entry_templates_group'} // "")
1101 0 1 if $old_uuid eq ($meta->{'last_selected_group'} // "")
1102 0 1 if $old_uuid eq ($meta->{'last_top_visible_group'} // "")
1105 0 2 if $old_uuid eq ($_->{'last_top_visible_entry'} // "")
1106 0 2 if $old_uuid eq ($_->{'previous_parent_group'} // "")
1109 0 3 if $old_uuid eq ($_->{'previous_parent_group'} // "")