Branch Coverage

blib/lib/Tags/HTML/Form.pm
Criterion Covered Total %
branch 35 72 48.6


line true false branch
51 1 17 unless (defined $self->{'form'})
54 1 16 unless (&blessed($self->{'form'}) and $self->{'form'}->isa("Data::HTML::Form"))
59 1 15 unless (defined $self->{'form'}{'css_class'})
64 1 14 unless (defined $self->{'submit'})
67 1 11 unless (&blessed($self->{'submit'}) and $self->{'submit'}->isa('Data::HTML::Form::Input') || $self->{'submit'}->isa('Data::HTML::Button'))
73 1 12 if ($self->{'submit'}->type ne "submit")
78 12 0 if (not defined $self->{'input'}) { }
84 0 0 if (not &blessed($self->{'input'}) or $self->{'input'}->isa("Tags::HTML::Form::Input"))
90 12 0 if (not defined $self->{'select'}) { }
96 0 0 if (not &blessed($self->{'select'}) or $self->{'select'}->isa("Tags::HTML::Form::Select"))
111 1 0 unless (defined $field and &blessed($field) and $field->isa('Data::HTML::Form::Input') || $field->isa('Data::HTML::Textarea') || $field->isa('Data::HTML::Form::Select'))
135 6 0 defined $self->{'form'}->css_class ? :
0 6 defined $self->{'form'}->action ? :
1 5 defined $self->{'form'}{'label'} ? :
140 1 5 if (@fields)
156 0 0 $field->id ? :
0 0 $field->required ? :
0 1 defined $field->label ? :
164 1 0 if ($field->isa('Data::HTML::Form::Input')) { }
0 0 elsif ($field->isa('Data::HTML::Form::Select')) { }
173 1 5 if (@fields)
182 1 5 if ($self->{'submit'}->isa('Data::HTML::Form::Input')) { }
190 1 5 defined $self->{'form'}{'label'} ? :
236 0 1 if (defined $first_input)
240 0 1 if (defined $first_select)
269 0 5 defined $object->name ? :
0 5 defined $object->value ? :
279 4 1 if ($object->data_type eq 'tags') { }
296 0 0 defined $object->css_class ? :
0 0 defined $object->id ? :
0 0 defined $object->placeholder ? :
0 0 defined $object->readonly ? :
0 0 defined $object->disabled ? :
0 0 defined $object->cols ? :
0 0 defined $object->rows ? :
0 0 defined $object->value ? :