Branch Coverage

blib/lib/HTML/FormHandler/InitResult.pm
Criterion Covered Total %
branch 52 72 72.2


line true false branch
14 7 438 if (my(@values) = $self->get_default_value)
15 0 7 @values > 1 ? :
16 7 0 if (ref $value eq 'HASH' or &blessed($value))
19 0 0 if defined $value
20 0 0 if defined $value
24 0 1284 if $field->inactive and not $field->_active
30 80 1204 if $result->has_value
31 1284 0 if $result
36 59 379 if keys %$my_value
38 130 308 if $self->DOES('HTML::FormHandler::Field')
49 0 0 unless defined $input or $exists or $self->has_fields
51 262 0 if (ref $input eq 'HASH')
53 0 821 if $field->inactive and not $field->_active
62 821 0 if $result
66 97 165 if $self->DOES('HTML::FormHandler::Field')
75 0 115 unless $item or $self->has_fields
79 0 333 if $field->inactive and not $field->_active
84 58 275 if (ref $item eq 'HASH' and not exists $$item{$field->accessor} or &blessed($item) and not $item->can($field->accessor)) { }
87 6 52 if ($field->form->use_init_obj_when_no_accessor_in_item)
92 4 2 if (defined $init_obj_value)
97 54 4 unless $found
100 275 0 unless $field->writeonly
103 333 0 if $result
108 50 65 if $self->DOES('HTML::FormHandler::Field')
120 0 7 if (scalar @$field_name_array)
131 3 279 if (defined $field->default_over_obj) { }
2 277 elsif ($field->form and $field->form->use_defaults_over_obj and @values = $field->get_default_value) { }
17 260 elsif (&blessed($item) and $item->can($accessor)) { }
258 2 elsif (exists $item->{$accessor}) { }
0 2 elsif (@values = $field->get_default_value) { }
140 1 16 if (scalar @values == 1 and ref $values[0] eq 'ARRAY' and $field->has_flag('multiple'))
146 3 255 if ($field->has_flag('multiple') and ref $v eq 'ARRAY') { }
157 9 271 if ($field->has_inflate_default_method)
161 7 273 if ($field->has_flag('multiple')) { }
162 1 6 scalar @values == 1 && !defined($values[0]) ? :
165 0 273 @values > 1 ? :