Branch Coverage

blib/lib/HTML/FormHandler/Field.pm
Criterion Covered Total %
branch 178 258 68.9


line true false branch
51 0 4691 unless $self->has_result
57 0 2340 unless $self->has_result
69 0 53 if $self->parent and $self->parent->result
84 1 1849 unless $self->has_result or not $self->form
86 5 1844 if @_
94 10 7618 unless $self->has_result or not $self->form
96 0 7618 unless $result
97 8 7610 if @_
111 2 0 if ($self->_can_deflate)
124 0 1508 if $self->inactive and not $self->_active
125 8 1500 if $self->password
126 1 1499 unless $result or $self->has_result
128 651 848 if ($self->has_result and $self->has_input and not $self->fif_from_value or $self->fif_from_value and not defined $lresult->value)
131 646 5 defined $lresult->input ? :
133 282 566 if ($lresult->has_value) { }
9 557 elsif (defined $self->value) { }
135 105 177 if ($self->_can_deflate) { }
141 282 0 defined $value ? :
167 1194 1748 unless $self->can($flag_name)
218 0 498 $self->form && $self->form->html_prefix ? :
224 0 0 unless (shift())->widget_wrapper
225 0 83 unless ucc_widget((shift())->widget_wrapper || '')
227 0 16 unless ucc_widget((shift())->widget || '')
261 6515 121 unless $self->tag_exists($name)
263 2 119 if ref $tag eq 'CODE'
264 118 1 unless $tag =~ /^%/
266 1 0 if $self->form and $self->form->block_exists($block_name)
284 1089 0 if scalar @ns and ref $ns[0] eq 'ARRAY'
318 26 346 if $self->form and $self->form->has_flag('is_html5')
372 4 44 ref $_[0] eq 'ARRAY' ? :
387 0 0 ref $_[0] eq 'ARRAY' ? :
396 19 5 if @$class
398 24 0 if $self->form
399 24 0 ref $mod_attr eq 'HASH' ? :
411 26 543 if ($self->form and $self->form->has_flag('is_html5'))
412 4 22 if $self->required
413 4 22 if defined $self->range_start
414 4 22 if defined $self->range_end
418 4 1134 if $self->$dep_attr
421 24 1683 if defined $self->$dep_attr
426 91 478 if @$class
428 569 0 if $self->form
429 569 0 ref $mod_attr eq 'HASH' ? :
434 20 532 if $result->has_errors
435 2 550 if $result->has_warnings
436 4 548 if $self->disabled
446 10 491 if @$class
448 501 0 if $self->form
449 501 0 ref $mod_attr eq 'HASH' ? :
464 83 514 if @$class
467 60 537 if $self->has_flag('is_compound') and not exists $attr->{'id'} && !$self->get_tag('no_wrapper_id')
469 597 0 if $self->form
470 597 0 ref $mod_attr eq 'HASH' ? :
475 24 553 if $result->has_error_results or $result->has_errors
476 2 575 if $result->has_warnings
489 0 0 if $self->input_type eq 'checkbox'
522 17 1138 if $self->form and $self->form->can($set_validate)
540 7 1152 if ($self->form and $self->form->can($set_default))
549 12 1420 if ($self->has_default_method) { }
67 1353 elsif (defined $self->default) { }
582 0 933 unless defined $value
583 66 867 ref $value eq 'ARRAY' ? :
585 148 839 if ref $_ or not defined $_
589 66 867 ref $value eq 'ARRAY' ? :
603 1 433 if ($self->form and $self->form->can('render_filter')) { }
614 0 1807 unless defined $string
634 0 828 if ($value)
638 56 772 if $self->has_language_handle
640 744 28 if $self->has_form
644 28 0 if ($ENV{'LANGUAGE_HANDLE'}) { }
645 0 28 if (&blessed($ENV{'LANGUAGE_HANDLE'})) { }
672 0 501 if ($self->form and $self->form->can('localize_meth')) { }
714 1 129 if $self->required_message
716 0 130 if $self->unique_message
725 3 131 if $self->_has_field_message($msg)
728 1 130 if $self->has_form and $self->form->_has_form_message($msg)
735 0 0 $self->has_form ? :
747 0 1159 if exists {@_}->{'html_attr'}
749 0 1159 if exists {@_}->{'no_render_label'}
757 20 1139 if $self->has_wrapper_tags
764 1089 70 if $self->form
766 1158 1 if $self->trim
768 59 1100 if $params->{'apply'}
776 4 1160 if ($self->disabled and $self->has_init_value) { }
67 1093 elsif (my(@values) = $self->get_default_value) { }
780 2 65 if ($self->has_inflate_default_method)
783 0 67 @values > 1 ? :
784 67 0 if defined $value
785 67 0 if defined $value
795 630 114 if ($exists) { }
2 112 elsif ($self->disabled) { }
6 106 elsif ($self->form and $self->form->use_fields_for_input_without_param) { }
31 75 elsif ($self->has_input_without_param) { }
819 257 0 if ($self->form) { }
826 0 257 if $self->writeonly
837 5513 173 if ($field->parent)
840 4286 1400 unless defined $parent_name and length $parent_name
848 1 1 if ($field->is_contains)
849 0 1 unless $parent
854 1 0 if ($parent)
857 1 0 unless defined $parent_accessor and length $parent_accessor
864 0 179 unless (defined $message[0])
867 0 179 if ref $message[0] eq 'ARRAY'
881 103 76 if ($self->parent)
890 1 106 if ($self->has_deflation) { }
106 0 elsif ($self->has_deflate_method) { }
915 0 0 unless defined $val
917 0 0 ref $_ && $_->isa('DateTime') ? :
0 0 ref $val eq 'ARRAY' ? :
923 0 0 (shift())->required ? :
927 0 1024 unless $self->has_input
941 0 0 if $v
943 0 0 if $iv
945 0 0 if $i
947 0 0 if $fif
949 0 0 if ($self->can('options'))
958 0 0 if ($self->widget)
963 0 0 if $self->form
965 0 0 unless ($widget_wrapper eq 'none')
977 0 0 if ($self->has_flag('has_contains'))
984 0 0 if ($self->has_fields)
997 11 1174 unless defined $x
998 1014 160 unless ref $x
999 38 122 if (ref $x eq 'ARRAY')
1001 27 4 if has_some_value($elem)
1005 119 3 if (ref $x eq 'HASH')
1007 109 19 if has_some_value($x->{$key})
1011 3 0 if &blessed($x)
1012 0 0 if ref $x