Branch Coverage

blib/lib/HTML/LinkList.pm
Criterion Covered Total %
branch 103 134 76.8


line true false branch
259 0 3 unless (defined $args{'urls'} and @{$args{'urls'};})
265 0 3 exists $args{'format'} ? :
283 6 9 exists $args{'labels'}{$link} ? :
293 3 0 $list ? :
511 3 0 if (defined $args{'link_tree'} and @{$args{'link_tree'};})
522 3 0 if $list
699 1 4 unless ($args{'labels'}{'/'})
704 0 5 if ($args{'preserve_paths'}) { }
726 5 0 if $list
827 1 1 unless ($args{'labels'}{'/'})
848 2 0 if $list
1032 8 3 $current_is_index ? :
11 0 unless defined $args{'end_depth'}
1037 1 10 unless ($args{'labels'}{'/'})
1042 0 11 if ($args{'preserve_paths'}) { }
1063 11 0 if $list
1157 118 35 unless ($label)
1159 118 0 unless $label
1160 31 87 if ($link =~ /([-\w]+)\.\w+$/) { }
87 0 elsif ($link =~ m[([-\w]+)/?$]) { }
1183 0 153 if ($args{'hide_ext'})
1185 0 0 if ($link =~ /(.*)\.[-\w]+$/)
1192 0 0 if (exists $args{'descriptions'}{$link} and defined $args{'descriptions'}{$link} and $args{'descriptions'}{$link})
1200 13 140 if (link_is_active('this_link', $link, 'current_url', $args{'current_url'})) { }
0 140 elsif ($args{'no_link'}) { }
7 133 elsif ($args{'current_url'} and exists $args{'current_parents'}{$link} and $args{'current_parents'}{$link}) { }
1234 15 138 unless ($args{'defer_post_item'})
1252 10 597 unless $url
1253 1 596 if ($url =~ m[^(/)index\.\w+$]) { }
0 596 elsif ($url =~ m[^(.*/)index\.\w+$]) { }
0 596 elsif ($url =~ m[/[-\w]+$]) { }
1281 5 26 unless $url
1283 8 18 if ($url =~ m[^(.*)/[-\w]+\.\w+$]) { }
16 2 elsif ($url ne '/') { }
1305 5 13 unless $url
1307 12 1 if ($url =~ m[^(.*)/[-\w]+$])
1324 25 426 if $url eq '/'
1350 65 88 unless $current_url
1352 13 75 if $link eq $current_url
1386 8 64 exists $args{'formats'}{$tree_depth} ? :
1393 138 15 if (not ref $ll) { }
1396 29 109 exists $args{'labels'}{$link} ? :
1404 36 102 if (ref $$lol_ref[0])
1417 13 2 if (defined $args{'start_depth'} and $args{'tree_depth'} < $args{'start_depth'}) { }
1434 0 59 $args{'end_depth'} && $tree_depth == $args{'end_depth'} ? :
0 59 $args{'end_depth'} && $tree_depth == $args{'end_depth'} ? :
1489 64 241 unless exists $paths{$newpath}
1492 134 17 if $args{'preserve_order'}
1494 133 446 if $paths{$a} == $paths{$b}
1527 12 10 if ($args{'current_url'})
1539 1 11 if ($args{'exclude_root_parent'})
1590 123 66 if ($path_depth == $depth) { }
46 20 elsif ($path_depth > $depth) { }
20 0 elsif ($path_depth < $depth) { }
1613 2 42 if (defined $args{'prepend_list'} and @{$args{'prepend_list'};})
1617 2 0 if ($#list_of_lists == 0 and ref $list_of_lists[0] eq 'ARRAY') { }
1628 0 44 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') { }
1690 0 215 if ($hide and $nohide and not $path =~ /$nohide/ and $path =~ /$hide/) { }
0 215 elsif ($hide and not $nohide and $path =~ /$hide/) { }
19 196 elsif ($path_depth < $args{'start_depth'}) { }
25 171 elsif ($args{'end_depth'} and $path_depth > $args{'end_depth'}) { }
9 162 elsif ($args{'navbar_type'} eq 'breadcrumb' and $args{'current_url'} and not $path_depth <= $current_url_depth && $args{'current_url'} =~ /^$path/ || $path eq $args{'current_url'} || $current_url_is_index && $path_depth >= $current_url_depth && $path =~ m[^$current_index_path/] || !$current_url_is_index && $path_depth >= $current_url_depth && $path =~ m[^$current_index_parent/]) { }
39 123 elsif ($args{'navbar_type'} || $args{'do_navbar'} and $args{'current_url'} and not $path_depth <= $current_url_depth && $args{'current_url'} =~ /^$path/ || $path eq $args{'current_url'} || $path_depth >= $current_url_depth && $path =~ m[^$current_index_path/] || $args{'start_depth'} == $args{'top_level'} && $path_depth == $args{'start_depth'} || !$current_url_is_index && $path_depth == $current_url_depth - 1 && $path =~ m[^$current_index_parent/] || $current_url_is_index && $path_depth == $current_url_depth && $path =~ m[^$current_index_parent/]) { }
1852 2 19 if (defined $args{'formats'})
1856 2 19 if ($args{'links_head'} ne $args{'subtree_head'} or $args{'links_foot'} ne $args{'subtree_foot'})
1859 2 0 unless (exists $formats{1})