Branch Coverage

blib/lib/HTML/Widget.pm
Criterion Covered Total %
branch 88 110 80.0


line true false branch
219 16 90 defined $name ? :
221 1 105 if (defined $attrs)
222 0 1 if ref $attrs ne 'HASH'
507 202 1 unless $abs
511 4 199 unless defined $name
513 8 195 if ($element->isa('HTML::Widget::Element::Block') and not $$element{'_pseudo_block'}) { }
521 0 195 if $self->xhtml_strict
528 1 202 if (defined $attrs)
529 0 1 if ref $attrs ne 'HASH'
544 110 89 if $self->implicit_subcontainer
546 0 89 if ($self->_first_element)
553 88 1 if ($self->subcontainer eq 'fieldset') { }
585 2 91 if ($self->implicit_subcontainer and $_[0] and $_[0] ne $$self{'attributes'}{'id'})
595 92 108 unless @_ > 0
596 108 0 @_ == 1 ? :
624 14 0 if $$self{'_elements'}
625 14 0 if $self->implicit_subcontainer
634 5 55 if (exists $$opt{'type'})
640 50 10 if (exists $$opt{'name'})
641 463 0 if defined $_->name
904 0 89 unless $type
909 2 87 if ($type =~ /^Not_(\w+)$/i)
914 88 1 unless $abs
948 2 1 if ($element->allow_constraint)
977 4 8 if (exists $opt{'type'})
1064 1 7 if ($widgets[0]->isa('HTML::Widget::Element'))
1065 0 1 unless $widgets[0]->isa('HTML::Widget::Element::NullContainer')
1072 1 7 if ($dest) { }
1076 7 0 if $$widget{'_elements'}
1080 4 4 if $$widget{'_constraints'}
1082 3 5 if $$widget{'_filters'}
1216 19 0 unless $abs
1248 2 1 if ($element->allow_filter)
1277 4 4 if (exists $opt{'type'})
1351 0 1 if $self->xhtml_strict
1355 0 1 unless ($top_level->can('legend'))
1387 0 5 if ($widgets[0]->isa('HTML::Widget::Element')) { }
1388 0 0 unless $widgets[0]->isa('HTML::Widget::Element::NullContainer')
1394 0 5 if $dest and not $dest->isa('HTML::Widget::Element::NullContainer')
1398 3 2 unless $dest
1404 0 5 unless $source and $source->isa('HTML::Widget::Element::NullContainer')
1410 3 2 if $$widget{'_constraints'}
1412 3 2 if $$widget{'_filters'}
1452 216 1 if ($self->container eq 'form')
1458 89 130 unless $$element{'_initialized'}
1463 11 0 unless $$filter{'_initialized'}
1468 81 189 unless $$constraint{'_initialized'}
1477 171 46 if ($query)
1478 0 171 unless blessed $query and $query->can('param')
1484 38 227 @values > 1 ? :
1496 0 1 unless defined $result->type
1504 3 177 defined $render ? :
3 180 ref $render ? :
1515 5 106 if @render and not grep({$name eq $_;} @render)
1521 171 46 $query ? :