Branch Coverage

blib/lib/Text/Microformat/Element.pm
Criterion Covered Total %
branch 40 54 74.0


line true false branch
15 0 531 unless defined $params and ref $params eq 'HASH'
18 531 0 if (defined $criteria)
19 0 531 unless ref $criteria eq 'HASH'
21 9 513 if ($k eq 'class' and defined $v and not ref $v)
27 300 231 if (defined $schema)
29 18 282 if (ref $schema eq 'HASH') { }
240 42 elsif (ref $schema eq 'ARRAY') { }
42 0 elsif (not ref $schema) { }
81 124 709 if (ref $schema eq 'HASH' and defined $$schema{$child} and not ref $$schema{$child} and length $$schema{$child})
84 18 106 if ($spec_class->_params->{'criteria'})
86 8 10 if ($$schema{$child} =~ /^!/)
92 519 582 if ($init)
96 297 222 if (ref $schema eq 'HASH') { }
97 12 285 if ($opts{'isa_format'}) { }
98 6 6 if ($opts{'use_child_criteria'}) { }
122 0 662 unless defined $criteria and ref $criteria eq 'HASH'
134 0 162 unless $element and UNIVERSAL::isa($element, 'HTML::Element')
137 137 25 if (ref $element eq 'HTML::Element') { }
0 25 elsif (ref $element eq 'XML::Element') { }
165 36 25 defined $self->MachineValue ? :
171 0 0 if (@{$self->_children;}) { }
175 0 0 if (@{$self->$accessor;})
188 0 0 if $@
212 6 64 unless UNIVERSAL::can($o, $bit)
214 1 63 unless UNIVERSAL::can($o, $accessor)
215 60 3 unless @path
230 0 32 unless defined $tag