Branch Coverage

blib/lib/Form/Tiny/Form.pm
Criterion Covered Total %
branch 54 56 96.4


line true false branch
66 319 6 if (ref $current or length($current // "") or not $def->hard_required)
70 281 77 if ($def->validate($self, $current))
91 202 250 if (exists $fields->{$curr_f})
94 16 186 $inline_hook ? :
97 198 4 if $self->_ft_mangle_field($validator, \$dirty->{$curr_f})
101 8 246 if ($validator->has_default) { }
14 232 elsif ($validator->required) { }
116 110 1387 if (defined $current_data)
121 6 162 if $path_value->[2]
123 16 146 if $inline_hook
131 108 2 if $all_ok
135 14 1375 if ($validator->has_default) { }
8 1367 elsif ($validator->required) { }
154 6 15 if ($raise and not defined $def)
170 331 9 if (not $hooks{'reformat'} && try(sub { $fields = $hooks{'reformat'}->($self, $fields); } ) and ref $fields eq 'HASH') { }
176 136 195 if $hooks{'before_validate'}
181 191 140 $meta->is_flat ? :
184 14 316 if $hooks{'after_validate'}
191 58 281 if $hooks{'cleanup'} and not $self->has_errors
194 190 149 $form_valid ? :
211 8 10 if $self->check($input)
220 159 3 if (@error == 1) { }
3 0 elsif (@error == 2) { }
221 156 3 if (defined builtin::blessed($error[0])) { }
223 0 156 unless $error->isa("Form::Tiny::Error")
227 4 152 if (not $error->has_field_def and $error->has_field)
246 10 151 if $error->isa("Form::Tiny::Error::NestedFormError")
260 4 4 $error->field_def ? :