Branch Coverage

blib/lib/HTML/Obj2HTML.pm
Criterion Covered Total %
branch 51 268 19.0


line true false branch
60 0 1 if ($opt eq 'components') { }
0 1 elsif ($opt eq 'default_currency') { }
0 1 elsif ($opt eq 'mode') { }
0 1 elsif ($opt eq 'warn_on_unknown_tag') { }
0 1 elsif ($opt eq 'html_fromarrayref_format') { }
0 1 elsif ($opt eq 'file_extension') { }
84 0 1 if ($loadcomponents)
96 0 0 if (ref $o eq 'HASH') { }
267 0 0 unless (ref $obj)
280 0 0 if (not defined $snippets->{$name}) { }
0 0 elsif (ref $snippets->{$name} ne 'ARRAY') { }
285 0 0 unless (ref $obj)
322 0 0 if (ref $c eq 'ARRAY' and $collapsearrayrefs) { }
0 0 elsif (defined $c) { }
335 0 0 if ($f =~ m[/])
341 0 0 if (-e $f)
353 0 0 unless ($f =~ m[^[\./]])
354 0 0 if (-e $f) { }
356 0 0 unless ($fetch)
357 0 0 if ($@)
360 0 0 if ($!)
364 0 0 if (ref $fetch eq "CODE")
393 0 0 if (not ref $inserto and $inserto =~ /staticfile:(.*)/) { }
0 0 elsif (not ref $inserto and $inserto =~ /file:(.*)/) { }
401 0 0 if (not ref $e->[1]) { }
0 0 elsif (ref $e->[1] eq 'ARRAY') { }
413 0 0 if (not ref $inserto and $inserto =~ /staticfile:(.*)/) { }
0 0 elsif (not ref $inserto and $inserto =~ /file:(.*)/) { }
421 0 0 if (not ref $e->[1]) { }
0 0 elsif (ref $e->[1] eq 'ARRAY') { }
440 0 0 if (ref $attr eq 'ARRAY') { }
0 0 elsif (ref $attr eq 'HASH') { }
445 0 0 if ($attrs{'_'})
448 0 0 if ($query =~ /\#(.*)/ and $attrs{'id'} eq $1) { }
0 0 elsif ($query =~ /^([^\#\.]\S*)/ and $tag eq $1) { }
462 0 4 unless (defined $o)
463 0 4 unless (ref $o)
467 0 4 if (ref $o eq "HASH")
471 0 4 if (ref $o eq "CODE")
475 0 0 if ($@)
478 0 4 if (ref $o ne "ARRAY")
485 0 6 unless (defined $tag)
488 0 6 if (ref $tag eq "ARRAY")
492 0 6 if (ref $tag eq "CODE")
496 0 0 if ($@)
499 0 6 if ($tag =~ /_(.+)/)
504 0 6 if ($tag =~ /\s/)
510 0 6 if ($html_fromarrayref_format)
513 0 0 if (ref $attr eq "HASH" and ($tags{$tag} & 2) == 0)
519 3 3 if ($attr and not ref $attr)
520 0 3 if ($attr =~ /staticfile:(.+)/) { }
0 3 elsif ($attr =~ /file:(.+)/) { }
0 3 elsif ($attr =~ /raw:(.+)/) { }
531 0 6 if (defined $extensions{$origtag})
532 0 0 if (defined $extensions{$origtag}{'scalarattr'} and not ref $attr)
534 0 0 if (defined $extensions{$origtag}{'before'})
536 0 0 if (ref $o eq 'ARRAY') { }
0 0 elsif (ref $o eq '') { }
543 0 0 if (defined $extensions{$origtag}{'tag'})
546 0 0 if (defined $extensions{$origtag}{'attr'})
547 0 0 if (ref $attr ne "HASH")
551 0 0 if (defined $attr->{$k}) { }
553 0 0 if ($k eq "class")
562 0 0 if (defined $extensions{$origtag}{'replace'})
564 0 0 if (ref $o eq 'HASH') { }
0 0 elsif (ref $o eq '') { }
574 0 6 if ($tag eq '_') { }
0 6 elsif ($tag eq 'raw') { }
0 6 elsif ($tag eq 'if') { }
0 6 elsif ($tag eq 'switch') { }
0 6 elsif ($tag eq 'md') { }
0 6 elsif ($tag eq 'plain') { }
0 6 elsif ($tag eq 'currency') { }
0 6 elsif ($tag eq 'pluralize') { }
0 6 elsif ($tag eq 'include') { }
0 6 elsif ($tag eq 'javascript') { }
0 6 elsif ($tag eq 'includejs') { }
0 6 elsif ($tag eq 'includecss') { }
1 5 elsif ($tag eq 'doctype') { }
0 5 elsif (ref $attr eq 'HASH' and defined $attr->{'removeif'} and $attr->{'removeif'}) { }
5 0 elsif ($tag) { }
575 0 0 if (ref $attr) { }
582 0 0 if (ref $attr) { }
589 0 0 if (ref $attr eq 'HASH') { }
0 0 elsif (ref $attr eq 'ARRAY') { }
590 0 0 if ($attr->{'cond'} and $attr->{'true'}) { }
0 0 elsif (not $attr->{'cond'} and $attr->{'false'}) { }
597 0 0 if ($attr->[$i])
606 0 0 if (ref $attr eq 'HASH') { }
607 0 0 if (defined $$attr{$attr->{'val'}}) { }
0 0 elsif (defined $attr->{'_default'}) { }
0 0 elsif (defined $attr->{'_'}) { }
619 0 0 if (ref $attr) { }
626 0 0 if (ref $attr) { }
633 0 0 if (ref $attr eq 'HASH') { }
0 0 elsif (not ref $attr) { }
642 0 0 if (ref $attr eq 'ARRAY') { }
655 0 0 if (not ref $attr) { }
0 0 elsif (ref $attr == 'HASH') { }
659 0 0 if ($attr->{'defer'})
662 0 0 if ($attr->{'async'})
687 0 5 if ($tags{$tag} & 2 and ref $attr ne "HASH")
692 0 5 if ($warn_on_unknown_tag and not defined $tags{$tag})
697 0 5 if (not defined $attr) { }
3 2 elsif (ref $attr eq 'ARRAY') { }
0 2 elsif (ref $attr eq 'HASH') { }
0 2 elsif (ref $attr eq 'CODE') { }
2 0 elsif (ref $attr eq '') { }
698 0 0 if ($tags{$tag} & 2) { }
0 0 elsif ($tags{$tag} & 1) { }
699 0 0 if ($mode eq 'XHTML') { }
717 0 0 if (ref $k eq 'ARRAY') { }
0 0 elsif (ref $attrs{$k} eq 'ARRAY') { }
0 0 elsif (ref $attrs{$k} eq 'HASH') { }
0 0 elsif ($k eq '_') { }
722 0 0 if ($k ne "_")
729 0 0 if ($k eq 'style') { }
0 0 elsif ($k eq 'if') { }
0 0 elsif (defined $attrs{$k}{'if'}) { }
737 0 0 if ($val->{'cond'} and $val->{'true'}) { }
0 0 elsif (not $val->{'cond'} and $val->{'false'}) { }
747 0 0 if ($attrs{$k}{'if'} and defined $attrs{$k}{'true'}) { }
0 0 elsif (not $attrs{$k}{'if'} and defined $attrs{$k}{'false'}) { }
761 0 0 if ($tags{$tag} & 2) { }
0 0 elsif (defined $content) { }
0 0 elsif ($tags{$tag} & 1) { }
763 0 0 if ($mode eq 'XHTML') { }
775 0 0 if ($mode eq 'XHTML') { }
787 0 0 if ($@)
794 0 6 if (defined $extensions{$origtag} and defined $extensions{$origtag}{'after'})
806 0 0 if (defined $val)
813 2 0 if ($val)
814 0 0 if (defined $dictionary{$1}) { }
854 0 39 if (defined $flags) { }