Branch Coverage

blib/lib/HTML/FormBuilder/Field.pm
Criterion Covered Total %
branch 50 62 80.6


line true false branch
29 0 97 @args % 2 ? :
35 61 36 if ($data->{'input'} and ref $data->{'input'} ne "ARRAY")
54 0 71 if $data->{'override_input_class'}
56 0 71 if ($stacked == 0)
65 71 0 if ($stacked == 1)
66 0 71 $data->{'class'} ? :
68 0 71 if ($data->{'type'} and $data->{'type'} eq 'hidden') { }
76 56 15 if (defined $data->{'label'})
83 1 55 if ($data->{'label'}{'tooltip'}) { }
90 54 1 $label_text ? :
97 61 10 if (defined $data->{'input'})
107 1 70 if (defined $data->{'comment'})
110 1 0 unless ($data->{'comment'}{'no_new_line'})
116 48 23 if (defined $data->{'error'})
121 1 47 ref $data->{'error'} eq 'ARRAY' ? :
130 61 10 if (defined $data->{'input'})
134 71 0 if ($stacked == 1)
164 0 76 if ($input_field->{'wrap_in_div_class'})
169 15 61 if (eval {
7 54 elsif ($input_field->{'type'} and $input_field->{'type'} eq 'textarea') { }
53 1 elsif ($input_field->{'type'}) { }
178 28 25 if ($type =~ /^(?:text|password)$/i) { }
1 24 elsif ($type =~ /button|submit/) { }
184 1 52 $type =~ /button|submit/ ? :
188 1 52 if ($type =~ /button|submit/)
192 0 76 if ($wrap_input)
196 3 73 if ($heading)
198 0 3 if ($wrap_heading)
202 1 2 if ($input_field->{'type'} and $input_field->{'type'} =~ /radio|checkbox/i) { }
211 1 75 if ($trailing)
213 0 1 if ($wrap_trailing)