Condition Coverage

blib/lib/Mojolicious/Plugin/FormFieldsFromJSON.pm
Criterion Covered Total %
condition 152 253 60.0


and 3 conditions

line !l l&&!r l&&r condition
98 0 1 1 $params and $params->{'hash'}
162 10 0 2 ref $value and 'HASH' eq ref $value
208 20 10 5 $validation->has_error($name) and not defined $errors{$name}
232 141 2 2 %fields_to_show and not $fields_to_show{$field->{'name'}}
279 86 1 4 not defined $path and ++$i <= $#{$self->dir;}
315 143 1 3 $plugin_config->{'alias'} and $plugin_config->{'alias'}{$type}
324 119 4 24 $plugin_config->{'global_attributes'} and $type ne 'hidden'
123 0 24 $plugin_config->{'global_attributes'} and $type ne 'hidden' and 'HASH' eq ref $plugin_config->{'global_attributes'}
344 145 0 2 $field->{'translate_sublabels'} and $plugin_config->{'translation_method'}
0 0 2 $field->{'translate_sublabels'} and $plugin_config->{'translation_method'} and not $field->{'translation_method'}
360 124 0 23 $template and $type ne 'hidden'
364 22 0 1 $plugin_config->{'translate_labels'} and $loc
22 0 1 $plugin_config->{'translate_labels'} and $loc and 'CODE' eq ref $loc
444 9 26 3 scalar @{[] unless $stash_values;} == 0 and defined $c->stash($name)
596 58 0 35 $numeric and $value =~ /[^0-9]/u
635 3 21 1 scalar @{[] unless $stash_values;} == 0 and defined $c->stash($name)
681 38 2 2 length $local_label and $field->{'translate_sublabels'}
2 0 2 length $local_label and $field->{'translate_sublabels'} and $loc
2 0 2 length $local_label and $field->{'translate_sublabels'} and $loc and 'CODE' eq ref $loc
726 3 23 2 scalar @{[] unless $stash_values;} == 0 and defined $c->stash($name)
771 40 2 2 length $local_label and $field->{'translate_sublabels'}
2 0 2 length $local_label and $field->{'translate_sublabels'} and $loc
2 0 2 length $local_label and $field->{'translate_sublabels'} and $loc and 'CODE' eq ref $loc

or 2 conditions

line l !l condition
27 87 0 $config //= {}
93 0 0 ($field->{'label'} // $field->{'name'}) // ''
95 4 0 $field->{'name'} // ''
155 0 0 ($field->{'name'} // $field->{'label'}) // ''
163 2 0 $value->{'msg'} // 1
192 10 0 $value->{'msg'} // 1
331 12 12 $field->{'attributes'}{$attribute} //= ''
361 23 0 $field->{'label'} // ''
375 0 0 (($field->{'id'} // $field->{'name'}) // $field->{'label'}) // ''
1 22 $field->{'msg'} // ''
1 22 $field->{'info'} // ''
388 0 0 ($field->{'name'} // $field->{'label'}) // ''
397 5 0 (((($params{$name}{'data'} // $from_stash) // $c->stash($name)) // $c->param($name)) // $field->{'data'}) // ''
408 0 0 ($field->{'name'} // $field->{'label'}) // ''
417 1 26 (((($params{$name}{'data'} // $from_stash) // $c->stash($name)) // $c->param($name)) // $field->{'data'}) // ''
428 0 0 ($field->{'name'} // $field->{'label'}) // ''
436 10 28 $params{$name} || {}
478 4 0 $field->{'size'} || 5
523 33 1 $params{'data'} || $field->{'data'} || []
620 0 0 ($field->{'name'} // $field->{'label'}) // ''
624 24 0 ($params{$name}{'data'} // $field->{'data'}) // []
627 25 0 $params{$name} || {}
711 0 0 ($field->{'name'} // $field->{'label'}) // ''
715 27 0 ($params{$name}{'data'} // $field->{'data'}) // []
718 28 0 $params{$name} || {}
801 0 0 ($field->{'name'} // $field->{'label'}) // ''
802 2 4 ((($params{$name}{'data'} // $c->stash($name)) // $c->param($name)) // $field->{'data'}) // ''
812 0 0 ($field->{'name'} // $field->{'label'}) // ''
813 0 5 ((($params{$name}{'data'} // $c->stash($name)) // $c->param($name)) // $field->{'data'}) // ''

or 3 conditions

line l !l&&r !l&&!r condition
31 1 0 0 $config->{'template'} //= $app->renderer->get_data_template($config->{'template_file'})
93 4 0 0 $field->{'label'} // $field->{'name'}
155 35 0 0 $field->{'name'} // $field->{'label'}
223 105 1 0 $configs{$file} or ref $file
224 105 1 0 $configs{$file} || $file
251 4 0 0 $configs{$file} or ref $file
252 4 0 0 $configs{$file} || $file
271 36 1 87 $configs->{$file} or ref $file
358 1 3 143 $field->{'template'} // $plugin_config->{'templates'}{$orig_type}
3 19 124 ($field->{'template'} // $plugin_config->{'templates'}{$orig_type}) // $plugin_config->{'template'}
375 0 23 0 $field->{'id'} // $field->{'name'}
23 0 0 ($field->{'id'} // $field->{'name'}) // $field->{'label'}
388 8 0 0 $field->{'name'} // $field->{'label'}
397 2 0 6 $params{$name}{'data'} // $from_stash
2 0 6 ($params{$name}{'data'} // $from_stash) // $c->stash($name)
0 1 5 (($params{$name}{'data'} // $from_stash) // $c->stash($name)) // $c->param($name)
1 5 0 ((($params{$name}{'data'} // $from_stash) // $c->stash($name)) // $c->param($name)) // $field->{'data'}
399 0 8 0 $field->{'id'} // $name
408 33 0 0 $field->{'name'} // $field->{'label'}
417 3 1 29 $params{$name}{'data'} // $from_stash
4 1 28 ($params{$name}{'data'} // $from_stash) // $c->stash($name)
2 1 27 (($params{$name}{'data'} // $from_stash) // $c->stash($name)) // $c->param($name)
2 1 26 ((($params{$name}{'data'} // $from_stash) // $c->stash($name)) // $c->param($name)) // $field->{'data'}
419 0 33 0 $field->{'id'} // $name
428 38 0 0 $field->{'name'} // $field->{'label'}
473 0 38 0 $field->{'id'} // $name
620 25 0 0 $field->{'name'} // $field->{'label'}
621 0 25 0 $field->{'id'} // $name
624 1 24 0 $params{$name}{'data'} // $field->{'data'}
711 28 0 0 $field->{'name'} // $field->{'label'}
712 0 28 0 $field->{'id'} // $name
715 1 27 0 $params{$name}{'data'} // $field->{'data'}
801 8 0 0 $field->{'name'} // $field->{'label'}
802 1 0 7 $params{$name}{'data'} // $c->stash($name)
1 1 6 ($params{$name}{'data'} // $c->stash($name)) // $c->param($name)
1 2 4 (($params{$name}{'data'} // $c->stash($name)) // $c->param($name)) // $field->{'data'}
803 0 8 0 $field->{'id'} // $name
812 6 0 0 $field->{'name'} // $field->{'label'}
813 0 0 6 $params{$name}{'data'} // $c->stash($name)
0 1 5 ($params{$name}{'data'} // $c->stash($name)) // $c->param($name)
1 0 5 (($params{$name}{'data'} // $c->stash($name)) // $c->param($name)) // $field->{'data'}
814 0 6 0 $field->{'id'} // $name