Branch Coverage

blib/lib/Form/Tiny/Form.pm
Criterion Covered Total %
branch 56 58 96.5


line true false branch
62 196 154 $out_ref ? :
66 315 6 if (ref $current or length($current // "") or not $def->hard_required)
70 275 69 if ($def->validate($self, $current))
74 192 152 if ($out_ref) { }
96 196 250 if (exists $fields->{$curr_f})
104 16 180 $inline_hook ? :
192 4 if $self->_ft_mangle_field($validator, $inline_hook ? &$inline_hook($self, $validator, $fields->{$curr_f}) : $fields->{$curr_f}, \$dirty->{$curr_f})
109 8 246 if ($validator->has_default) { }
14 232 elsif ($validator->required) { }
126 103 1276 if (defined $current_data)
132 154 6 unless ($path_value->{'structure'})
133 16 138 if $inline_hook
143 101 2 if $all_ok
147 12 1266 if ($validator->has_default) { }
8 1258 elsif ($validator->required) { }
171 6 110 if ($raise and not defined $def)
187 313 9 if (not $hooks{'reformat'} && try(sub { $fields = $hooks{'reformat'}->($self, $fields); } ) and ref $fields eq 'HASH') { }
193 125 188 if $hooks{'before_validate'}
198 186 127 $meta->is_flat ? :
201 14 299 if $hooks{'after_validate'}
208 58 264 if $hooks{'cleanup'} and not $self->has_errors
211 187 135 $form_valid ? :
228 6 6 if $self->check($input)
237 144 3 if (@error == 1) { }
3 0 elsif (@error == 2) { }
238 141 3 if (defined &blessed($error[0])) { }
240 0 141 unless $error->isa("Form::Tiny::Error")
258 102 45 if $error->has_field
262 6 140 if $error->isa("Form::Tiny::Error::NestedFormError")