Branch Coverage

blib/lib/HTML/FormHandler/Field.pm
Criterion Covered Total %
branch 179 258 69.3


line true false branch
51 0 4713 unless $self->has_result
57 0 2354 unless $self->has_result
69 0 53 if $self->parent and $self->parent->result
84 1 1858 unless $self->has_result or not $self->form
86 5 1853 if @_
94 10 7652 unless $self->has_result or not $self->form
96 0 7652 unless $result
97 8 7644 if @_
111 2 0 if ($self->_can_deflate)
124 0 1514 if $self->inactive and not $self->_active
125 8 1506 if $self->password
126 1 1505 unless $result or $self->has_result
128 653 852 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 648 5 defined $lresult->input ? :
133 282 570 if ($lresult->has_value) { }
9 561 elsif (defined $self->value) { }
135 105 177 if ($self->_can_deflate) { }
141 282 0 defined $value ? :
167 1197 1757 unless $self->can($flag_name)
218 0 500 $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 6554 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 1095 0 if scalar @ns and ref $ns[0] eq 'ARRAY'
318 26 349 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 546 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 1140 if $self->$dep_attr
421 24 1692 if defined $self->$dep_attr
426 92 480 if @$class
428 572 0 if $self->form
429 572 0 ref $mod_attr eq 'HASH' ? :
434 21 534 if $result->has_errors
435 2 553 if $result->has_warnings
436 4 551 if $self->disabled
446 10 494 if @$class
448 504 0 if $self->form
449 504 0 ref $mod_attr eq 'HASH' ? :
464 84 516 if @$class
467 60 540 if $self->has_flag('is_compound') and not exists $attr->{'id'} && !$self->get_tag('no_wrapper_id')
469 600 0 if $self->form
470 600 0 ref $mod_attr eq 'HASH' ? :
475 25 555 if $result->has_error_results or $result->has_errors
476 2 578 if $result->has_warnings
489 0 0 if $self->input_type eq 'checkbox'
522 18 1143 if $self->form and $self->form->can($set_validate)
540 7 1158 if ($self->form and $self->form->can($set_default))
549 13 1427 if ($self->has_default_method) { }
67 1360 elsif (defined $self->default) { }
582 0 937 unless defined $value
583 66 871 ref $value eq 'ARRAY' ? :
585 148 843 if ref $_ or not defined $_
589 66 871 ref $value eq 'ARRAY' ? :
603 1 435 if ($self->form and $self->form->can('render_filter')) { }
614 0 1816 unless defined $string
634 0 833 if ($value)
638 56 777 if $self->has_language_handle
640 749 28 if $self->has_form
644 28 0 if ($ENV{'LANGUAGE_HANDLE'}) { }
645 0 28 if (&blessed($ENV{'LANGUAGE_HANDLE'})) { }
672 0 504 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 1165 if exists {@_}->{'html_attr'}
749 0 1165 if exists {@_}->{'no_render_label'}
757 20 1145 if $self->has_wrapper_tags
764 1095 70 if $self->form
766 1164 1 if $self->trim
768 59 1106 if $params->{'apply'}
776 4 1167 if ($self->disabled and $self->has_init_value) { }
68 1099 elsif (my(@values) = $self->get_default_value) { }
780 2 66 if ($self->has_inflate_default_method)
783 0 68 @values > 1 ? :
784 68 0 if defined $value
785 68 0 if defined $value
795 634 115 if ($exists) { }
2 113 elsif ($self->disabled) { }
6 107 elsif ($self->form and $self->form->use_fields_for_input_without_param) { }
31 76 elsif ($self->has_input_without_param) { }
819 257 0 if ($self->form) { }
826 0 257 if $self->writeonly
837 5533 173 if ($field->parent)
840 4306 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 1 180 unless (defined $message[0])
867 0 181 if ref $message[0] eq 'ARRAY'
881 105 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 1029 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 10 1181 unless defined $x
998 1020 161 unless ref $x
999 39 122 if (ref $x eq 'ARRAY')
1001 28 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