Condition Coverage

blib/lib/File/KDBX.pm
Criterion Covered Total %
condition 151 300 50.3


and 3 conditions

line !l l&&!r l&&r condition
33 59 0 0 @_ == 1 and &blessed($_[0])
59 0 0 @_ == 1 and &blessed($_[0]) and $_[0]->isa($class)
216 295 89 0 @_ == 1 and XXX
293 0 0 2 $root->name eq $temp->name && $root->is_expanded ^ $temp->is_expanded && $root->notes eq $temp->notes && !@{$root->entries;} && !defined($root->custom_icon_uuid) && !keys(%{$root->custom_data;}) && $root->icon_id == $temp->icon_id && $root->expires ^ $temp->expires && $root->default_auto_type_sequence eq $temp->default_auto_type_sequence && !defined($root->enable_auto_type) && !defined($root->enable_searching)
346 5 0 1 not $group and $self->recycle_bin_enabled
543 120 0 0 @_ == 1 and XXX
578 172 0 0 @_ == 1 and XXX
644 1 0 17 $wanted and $search_in
1 0 17 $wanted and $search_in and nonempty($text)
1066 0 129 1 defined $string->{'value'} and $string->{'value'} =~ /$fieldref_match/

or 2 conditions

line l !l condition
137 1889 89 $_[0]{'headers'} //= scalar &$default($_[0])
138 323 89 $_[0]{'inner_headers'} //= scalar &$default($_[0])
139 1790 80 $_[0]{'meta'} //= scalar &$default($_[0])
140 26 80 $_[0]{'binaries'} //= scalar &$default($_[0])
141 95 59 $_[0]{'deleted_objects'} //= scalar &$default($_[0])
142 0 59 $_[0]{'raw'} //= undef
148 14 59 $_[0]->headers->{'master_seed'} //= scalar &$default($_[0])
149 14 59 $_[0]->headers->{'encryption_iv'} //= scalar &$default($_[0])
150 14 59 $_[0]->headers->{'stream_start_bytes'} //= scalar &$default($_[0])
157 206 59 $_[0]->headers->{'kdf_parameters'} //= scalar &$default($_[0])
168 0 59 $_[0]->meta->{'database_name_changed'} //= scalar &$default($_[0])
170 0 59 $_[0]->meta->{'database_description_changed'} //= scalar &$default($_[0])
172 0 59 $_[0]->meta->{'default_username_changed'} //= scalar &$default($_[0])
175 0 59 $_[0]->meta->{'master_key_changed'} //= scalar &$default($_[0])
179 160 60 $_[0]->meta->{'custom_icons'} //= scalar &$default($_[0])
182 0 59 $_[0]->meta->{'recycle_bin_changed'} //= scalar &$default($_[0])
184 0 59 $_[0]->meta->{'entry_templates_group_changed'} //= scalar &$default($_[0])
189 0 59 $_[0]->meta->{'settings_changed'} //= scalar &$default($_[0])
217 236 59 $self->{'meta'}{'memory_protection'} //= {}
506 4 1 shift() // (return)
544 60 59 $self->{'meta'}{'custom_data'} //= {}
571 0 0 $self->custom_data(@_) // (return)
579 112 60 $self->{'headers'}{'public_custom_data'} //= {}
636 18 0 shift() // (return)
839 1 5 $_->custom_icon_uuid // ""
877 2 0 ($args{'max_items'} // $self->history_max_items) // 10
878 2 0 ($args{'max_size'} // $self->history_max_size) // 6291456
879 2 0 ($args{'max_age'} // $self->maintenance_history_days) // 365
924 0 173 $args{'compatible'} // 1
961 67 0 $self->headers->{'kdf_parameters'}{'R'} //= 100000
1041 6 0 $object->{'uuid'} // (return)
1044 6 0 $meta->{'recycle_bin_uuid'} // ""
1045 6 0 $meta->{'entry_templates_group'} // ""
1046 6 0 $meta->{'last_selected_group'} // ""
1047 6 0 $meta->{'last_top_visible_group'} // ""
1056 13 0 shift() // (return)
1063 0 26 $_->{'previous_parent_group'} // ""
1078 1 0 shift() // (return)
1081 1 0 $meta->{'recycle_bin_uuid'} // ""
1082 1 0 $meta->{'entry_templates_group'} // ""
1083 1 0 $meta->{'last_selected_group'} // ""
1084 1 0 $meta->{'last_top_visible_group'} // ""
1087 0 2 $_->{'last_top_visible_entry'} // ""
1088 0 2 $_->{'previous_parent_group'} // ""
1091 0 3 $_->{'previous_parent_group'} // ""

or 3 conditions

line l !l&&r !l&&!r condition
77 0 1 0 $KEYS{$self} // ()
0 1 0 $SAFE{$self} // ()
134 97 59 0 $_[0]{'sig1'} //= $default
135 118 59 0 $_[0]{'sig2'} //= $default
136 546 59 0 $_[0]{'version'} //= $default
145 0 0 59 $_[0]->headers->{'comment'} //= $default
146 0 59 0 $_[0]->headers->{'cipher_id'} //= $default
147 2 59 0 $_[0]->headers->{'compression_flags'} //= $default
165 0 0 59 $_[0]->meta->{'generator'} //= $default
166 0 0 59 $_[0]->meta->{'header_hash'} //= $default
167 0 0 59 $_[0]->meta->{'database_name'} //= $default
169 0 0 59 $_[0]->meta->{'database_description'} //= $default
171 0 0 59 $_[0]->meta->{'default_username'} //= $default
173 0 59 0 $_[0]->meta->{'maintenance_history_days'} //= $default
174 0 0 59 $_[0]->meta->{'color'} //= $default
176 0 59 0 $_[0]->meta->{'master_key_change_rec'} //= $default
177 0 59 0 $_[0]->meta->{'master_key_change_force'} //= $default
180 7 59 0 $_[0]->meta->{'recycle_bin_enabled'} //= $default
181 7 59 0 $_[0]->meta->{'recycle_bin_uuid'} //= $default
183 0 59 0 $_[0]->meta->{'entry_templates_group'} //= $default
185 0 59 0 $_[0]->meta->{'last_selected_group'} //= $default
186 0 59 0 $_[0]->meta->{'last_top_visible_group'} //= $default
187 2 59 0 $_[0]->meta->{'history_max_items'} //= $default
188 2 59 0 $_[0]->meta->{'history_max_size'} //= $default
193 0 0 59 $_[0]->memory_protection->{'protect_title'} //= $default
194 0 0 59 $_[0]->memory_protection->{'protect_username'} //= $default
195 0 59 0 $_[0]->memory_protection->{'protect_password'} //= $default
196 0 0 59 $_[0]->memory_protection->{'protect_url'} //= $default
197 0 0 59 $_[0]->memory_protection->{'protect_notes'} //= $default
236 1 1 9 $_->{'name'} || nonempty($_->{'last_modification_time'})
241 1 2 153 $_->previous_parent_group || nonempty($_->tags || &any(sub { nonempty($_->{'last_modification_time'}); } , values %{$_->custom_data;}))
247 1 1 24 $_->previous_parent_group || defined $_->quality_check && !$_->quality_check || &any(sub { nonempty($_->{'last_modification_time'}); } , values %{$_->custom_data;})
270 605 59 0 $self->{'root'} //= $self->_implicit_root
403 0 15 0 delete $args{'group'} // $self->root
421 0 133 0 delete $args{'base'} // $self->root
435 0 20 0 delete $args{'group'} // $self->root
453 0 204 0 delete $args{'base'} // $self->root
464 0 106 0 delete $args{'base'} // $self->root
479 0 0 0 $args{'uuid'} or $args{'data'}
489 0 0 0 &first(sub { $_->{'uuid'} eq $uuid; } , @{$self->custom_icons;}) // do { push @{$self->custom_icons;}, my $i = {"uuid", $uuid}; $i }
518 0 9 0 $args{'uuid'} // generate_uuid()
549 1 0 0 $args{'key'} or $args{'value'}
610 0 0 11 $uuid eq "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" or $uuid eq "0000000000000000"
877 0 2 0 $args{'max_items'} // $self->history_max_items
878 0 2 0 $args{'max_size'} // $self->history_max_size
879 2 0 0 $args{'max_age'} // $self->maintenance_history_days
926 0 173 0 $params //= $self->kdf_parameters
929 173 0 0 $params || !defined($params->{'$UUID'})
940 155 0 0 $params->{'S'} //= $self->transform_seed
941 155 0 0 $params->{'R'} //= $self->transform_rounds
953 81 0 0 $self->headers->{'kdf_parameters'}{'S'} //= &random_bytes(32)
969 0 39 0 $args{'uuid'} //= $self->headers->{'cipher_id'}
970 0 39 0 $args{'iv'} //= $self->headers->{'encryption_iv'}
981 0 18 0 delete $args{'id'} // $self->inner_random_stream_id
0 18 0 $args{'stream_id'} //= delete $args{'id'} // $self->inner_random_stream_id
982 0 18 0 $args{'key'} //= $self->inner_random_stream_key
993 9 59 0 $self->headers->{'inner_random_stream_id'} //= do { my $version = $self->minimum_version; $version < 262144 ? 2 : 3 }
17 68 0 $self->inner_headers->{'inner_random_stream_id'} //= ($self->headers->{'inner_random_stream_id'} //= do { my $version = $self->minimum_version; $version < 262144 ? 2 : 3 })
1010 9 59 0 $self->headers->{'inner_random_stream_key'} //= &random_bytes(64)
39 68 0 $self->inner_headers->{'inner_random_stream_key'} //= ($self->headers->{'inner_random_stream_key'} //= &random_bytes(64))