Branch Coverage

blib/lib/HTML/LinkList.pm
Criterion Covered Total %
branch 134 168 79.7


line true false branch
260 0 3 unless (defined $args{'urls'} and @{$args{'urls'};})
266 0 3 exists $args{'format'} ? :
275 6 9 exists $args{'labels'}{$link} ? :
286 3 0 $list ? :
511 3 0 if (defined $args{'link_tree'} and @{$args{'link_tree'};})
522 3 0 if $list
699 2 4 unless ($args{'labels'}{'/'})
704 0 6 if ($args{'preserve_paths'}) { }
726 6 0 if $list
827 1 1 unless ($args{'labels'}{'/'})
848 2 0 if $list
1034 9 4 $current_is_index ? :
13 0 unless defined $args{'end_depth'}
1037 1 12 unless ($args{'labels'}{'/'})
1042 0 13 if ($args{'preserve_paths'}) { }
1063 13 0 if $list
1157 147 38 unless ($label)
1159 147 0 unless $label
1160 39 108 if ($link =~ /([-\w]+)\.\w+$/o) { }
108 0 elsif ($link =~ m[([-\w]+)/?$]o) { }
1183 0 185 if ($args{'hide_ext'})
1185 0 0 if ($link =~ /(.*)\.[-\w]+$/o)
1192 0 0 if (exists $args{'descriptions'}{$link} and defined $args{'descriptions'}{$link} and $args{'descriptions'}{$link})
1200 15 170 if (link_is_active('this_link', $link, 'current_url', $args{'current_url'})) { }
0 170 elsif ($args{'no_link'}) { }
10 160 elsif ($args{'current_url'} and exists $args{'current_parents'}{$link} and $args{'current_parents'}{$link}) { }
1234 15 170 unless ($args{'defer_post_item'})
1252 21 687 unless $url
1253 1 686 if ($url =~ m[^/index\.\w+$]o) { }
0 686 elsif ($url =~ m[^(.*/)index\.\w+$]o) { }
13 673 elsif ($url =~ m[/[-\w]+$]o) { }
1281 0 50 unless $url
1283 15 35 if ($url =~ m[^(.*)/[-\w]+\.\w+$]o) { }
31 8 elsif ($url ne '/' and $url =~ m[/$]o) { }
1305 5 30 unless $url
1307 27 3 if ($url =~ m[^(.*)/[-\w]+$]o)
1324 29 512 if $url eq '/'
1325 295 217 if ($url =~ m[/$]o)
1348 77 108 unless $args{'current_url'}
1352 15 93 if $link eq $args{'current_url'}
1386 8 78 exists $args{'formats'}{$tree_depth} ? :
1393 170 17 if (not ref $ll) { }
1397 32 138 exists $args{'labels'}{$link} ? :
1404 45 125 if (ref $lol_ref->[0])
1417 15 2 if (defined $args{'start_depth'} and $args{'tree_depth'} < $args{'start_depth'}) { }
1442 0 71 $args{'end_depth'} && $tree_depth == $args{'end_depth'} ? :
0 71 $args{'end_depth'} && $tree_depth == $args{'end_depth'} ? :
1489 74 309 unless exists $paths{$newpath}
1492 162 24 if $args{'preserve_order'}
1495 162 525 if $paths{$a} == $paths{$b}
1527 14 11 if ($args{'current_url'})
1539 2 12 if ($args{'exclude_root_parent'})
1590 154 84 if ($path_depth == $depth) { }
57 27 elsif ($path_depth > $depth) { }
27 0 elsif ($path_depth < $depth) { }
1613 3 48 if (defined $args{'prepend_list'} and @{$args{'prepend_list'};})
1617 3 0 if ($#list_of_lists == 0 and ref $list_of_lists[0] eq 'ARRAY') { }
1628 0 51 if (defined $args{'append_list'} and @{$args{'append_list'};})
1632 0 0 if ($#list_of_lists == 0 and ref $list_of_lists[0] eq 'ARRAY') { }
1688 0 260 if ($hide and $nohide and not $path =~ /$nohide/ and $path =~ /$hide/) { }
0 260 elsif ($hide and not $nohide and $path =~ /$hide/) { }
22 238 elsif ($path_depth < $args{'start_depth'}) { }
25 213 elsif ($args{'end_depth'} and $path_depth > $args{'end_depth'}) { }
1716 15 6 if ($args{'current_url'}) { }
1725 10 5 $current_url_is_index ? :
1727 6 9 $parent_depth == 1 ? :
1730 2 1 $parent_depth == 2 ? :
12 3 $parent_depth <= 1 ? :
1740 2 13 if ($args{'navbar_type'} eq 'breadcrumb') { }
11 2 elsif ($args{'navbar_type'} or $args{'do_navbar'}) { }
1747 3 17 if ($pd <= $current_url_depth and $args{'current_url'} =~ /^$path/) { }
0 17 elsif ($path eq $args{'current_url'}) { }
3 14 elsif ($pd >= $current_url_depth and $path =~ /^$current_url/) { }
2 15 elsif ($parent and $pd >= $current_url_depth and $path =~ /^$parent/) { }
1778 0 134 if ($pd > $current_url_depth + 1)
1782 19 115 if ($pd == $current_url_depth + 1 and $path =~ /^$current_url/) { }
35 80 elsif ($pd == $current_url_depth and $path =~ /^$parent/) { }
24 56 elsif ($grandparent and $pd == $parent_depth and $path =~ /^$grandparent/) { }
9 56 elsif ($greatgrandparent and $pd == $parent_depth - 1 and $path =~ /^$greatgrandparent/) { }
1863 0 27 $args{'pre_item_active'} ? :
1 26 $args{'pre_item_current_parent'} ? :
1899 2 22 if (defined $args{'formats'})
1903 2 22 if ($args{'links_head'} ne $args{'subtree_head'} or $args{'links_foot'} ne $args{'subtree_foot'})
1906 2 0 unless (exists $formats{'1'})