Branch Coverage

blib/lib/HTML/ListToTree.pm
Criterion Covered Total %
branch 57 94 60.6


line true false branch
74 1 51 if ($args{'Widget'}) { }
75 0 1 if (ref $args{'Widget'}) { }
83 0 1 if $@
92 0 0 $unlinks{lc $args{'UnlinkedLeaves'}} ? :
0 52 if exists $args{'UnlinkedLeaves'}
103 3 49 if exists $args{'Source'}
130 14 1 ref $_[0] eq 'ARRAY' ? :
131 37 1 ref $args[0] ? :
197 1 5 if $$_{'_text'} eq $text
202 1 0 if $node
225 1 22 if substr($$_{'_link'}, $offset) eq $link
230 2 14 if $node
345 2 1 unless exists $args{'UseIcons'}
347 2 1 $args{'UseIcons'} ? :
355 0 3 if ($args{'BasePath'})
358 0 0 if $$self{'_link'}
391 0 15 if $args{'BasePath'}
393 8 7 $#{$$_{'_children'};} >= 0 && $args{'UseIcons'} ? :
405 0 102 if $args{'BasePath'}
407 18 84 $#{$$_{'_children'};} >= 0 && $args{'UseIcons'} ? :
419 0 0 unless substr($jspath, 0, 2) eq './' and substr($path, 0, 2) eq './'
459 174 0 $tags_accepted{lc $1} ? :
462 0 4 unless $src =~ /^\s*<(?:ul|ol)>/is
478 4 0 if $_->tag eq 'ul' or $_->tag eq 'ol'
483 0 4 if $$self{'_debug'}
495 0 46 unless $_->tag eq 'li'
504 0 46 unless ($#{$tree[$i]{'_children'};} >= 0 or $tree[$i]{'_link'})
505 0 0 if ($onUnlink eq 'warn') { }
0 0 elsif ($onUnlink eq 'ignore') { }
513 0 46 unless $tree[$i]{'_text'}
523 0 46 ref $_ ? :
536 0 60 unless ref $_
540 46 14 if ($_->tag eq 'a') { }
14 0 elsif ($_->tag eq 'ul' or $_->tag eq 'ol') { }
547 0 14 unless $elem
571 0 120 if ref $node eq 'ARRAY'
573 120 0 $$node{'_link'} && $$node{'_link'} =~ /^([^\#]+)/ ? :
575 120 0 if (exists $$node{'_children'})
578 39 78 if substr($$_{'_link'}, 0, 1) eq '#'
584 12 3 if scalar @nextlevel
660 0 1 unless my $js = $_[0]{'_widget'}->getJavascript
679 0 1 unless my $css = $_[0]{'_widget'}->getCSS
700 0 1 unless my $icon = $_[0]{'_widget'}->getIcon($_[1])
720 0 1 unless %icons
724 0 18 unless _writeFile($v, ($_[1] || $_[0]{'_iconpath'}) . "/$k", 1)
731 0 21 unless open OUTF, ">$path"
734 19 2 if $binary