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
101 0 1 1 $params and $params->{'hash'}
156 5 0 2 ref $value and 'HASH' eq ref $value
201 11 8 4 $validation->has_error($name) and not defined $errors{$name}
225 141 2 2 %fields_to_show and not $fields_to_show{$field->{'name'}}
272 84 1 4 not defined $path and ++$i <= $#{$self->dir;}
309 143 1 3 $plugin_config->{'alias'} and $plugin_config->{'alias'}{$type}
318 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'}
335 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'}
346 124 0 23 $template and $type ne 'hidden'
350 22 0 1 $plugin_config->{'translate_labels'} and $loc
22 0 1 $plugin_config->{'translate_labels'} and $loc and 'CODE' eq ref $loc
428 9 26 3 scalar @{[] unless $stash_values;} == 0 and defined $c->stash($name)
580 58 0 35 $numeric and $value =~ /[^0-9]/
618 3 21 1 scalar @{[] unless $stash_values;} == 0 and defined $c->stash($name)
663 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
708 3 23 2 scalar @{[] unless $stash_values;} == 0 and defined $c->stash($name)
754 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
30 85 0 $config //= {}
96 0 0 ($field->{'label'} // $field->{'name'}) // ''
98 4 0 $field->{'name'} // ''
149 0 0 ($field->{'name'} // $field->{'label'}) // ''
157 2 0 $value->{'msg'} // 1
185 10 0 $value->{'msg'} // 1
322 12 12 $field->{'attributes'}{$attribute} //= ''
347 23 0 $field->{'label'} // ''
361 0 0 (($field->{'id'} // $field->{'name'}) // $field->{'label'}) // ''
1 22 $field->{'msg'} // ''
1 22 $field->{'info'} // ''
373 0 0 ($field->{'name'} // $field->{'label'}) // ''
382 5 0 (((($params{$name}{'data'} // $from_stash) // $c->stash($name)) // $c->param($name)) // $field->{'data'}) // ''
393 0 0 ($field->{'name'} // $field->{'label'}) // ''
402 1 26 (((($params{$name}{'data'} // $from_stash) // $c->stash($name)) // $c->param($name)) // $field->{'data'}) // ''
413 0 0 ($field->{'name'} // $field->{'label'}) // ''
420 10 28 $params{$name} || {}
464 4 0 $field->{'size'} || 5
509 33 1 $params{'data'} || $field->{'data'} || []
603 0 0 ($field->{'name'} // $field->{'label'}) // ''
607 24 0 ($params{$name}{'data'} // $field->{'data'}) // []
610 25 0 $params{$name} || {}
693 0 0 ($field->{'name'} // $field->{'label'}) // ''
697 27 0 ($params{$name}{'data'} // $field->{'data'}) // []
700 28 0 $params{$name} || {}
784 0 0 ($field->{'name'} // $field->{'label'}) // ''
785 2 4 ((($params{$name}{'data'} // $c->stash($name)) // $c->param($name)) // $field->{'data'}) // ''
795 0 0 ($field->{'name'} // $field->{'label'}) // ''
796 0 5 ((($params{$name}{'data'} // $c->stash($name)) // $c->param($name)) // $field->{'data'}) // ''

or 3 conditions

line l !l&&r !l&&!r condition
34 1 0 0 $config->{'template'} //= $app->renderer->get_data_template($config->{'template_file'})
96 4 0 0 $field->{'label'} // $field->{'name'}
149 23 0 0 $field->{'name'} // $field->{'label'}
216 105 1 0 $configs{$file} or ref $file
217 105 1 0 $configs{$file} || $file
244 4 0 0 $configs{$file} or ref $file
245 4 0 0 $configs{$file} || $file
264 36 1 85 $configs->{$file} or ref $file
344 1 3 143 $field->{'template'} // $plugin_config->{'templates'}{$orig_type}
3 19 124 ($field->{'template'} // $plugin_config->{'templates'}{$orig_type}) // $plugin_config->{'template'}
361 0 23 0 $field->{'id'} // $field->{'name'}
23 0 0 ($field->{'id'} // $field->{'name'}) // $field->{'label'}
373 8 0 0 $field->{'name'} // $field->{'label'}
382 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'}
384 0 8 0 $field->{'id'} // $name
393 33 0 0 $field->{'name'} // $field->{'label'}
402 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'}
404 0 33 0 $field->{'id'} // $name
413 38 0 0 $field->{'name'} // $field->{'label'}
459 0 38 0 $field->{'id'} // $name
603 25 0 0 $field->{'name'} // $field->{'label'}
604 0 25 0 $field->{'id'} // $name
607 1 24 0 $params{$name}{'data'} // $field->{'data'}
693 28 0 0 $field->{'name'} // $field->{'label'}
694 0 28 0 $field->{'id'} // $name
697 1 27 0 $params{$name}{'data'} // $field->{'data'}
784 8 0 0 $field->{'name'} // $field->{'label'}
785 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'}
786 0 8 0 $field->{'id'} // $name
795 6 0 0 $field->{'name'} // $field->{'label'}
796 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'}
797 0 6 0 $field->{'id'} // $name