Branch Coverage

blib/lib/Pod/Query.pm
Criterion Covered Total %
branch 139 204 68.1


line true false branch
84 128 27 if @_ == 1
133 0 0 if defined wantarray
156 0 9 if $cached = $CACHE{$pod_class}
166 0 9 if $path_only or not $s->path
168 9 0 $MOCK_ROOT ? :
170 0 9 if ($DEBUG_LOL_DUMP)
177 0 9 if ($DEBUG_TREE_DUMP)
204 0 4 if $path = $CACHE{$pod_class}
210 0 4 if $path and -f $path
215 2 20 if $path and -f $path
223 9 2 $_ && $_ ne '.' ? :
224 1 10 if ($path and -f $path)
225 0 1 if ref $s
258 0 322 $tag eq 'for' ? :
320 14 93 unless %$node
323 5 88 if ref $kids and &first(sub { $_->{'tag'} =~ /$is_head/u; } , @$kids)
328 0 14 if $DEBUG_TREE
331 0 545 if $DEBUG_TREE
334 0 545 if $DEBUG_TREE
337 93 452 if (not $is_in or $leaf->{'tag'} =~ /$is_out/u) { }
340 88 5 if ($leaf->{'tag'} =~ /$is_head/u)
346 0 452 if $DEBUG_TREE
379 223 322 if ref $node eq ref {}
384 7 315 if ($tag =~ / ^ over- /ux) { }
408 7 67 unless @nodes
414 63 4 @nodes ? :
420 67 175 if $tag =~ / ^ item- /ux
430 0 7 if ($DEBUG_STRUCT_OVER)
457 0 10 unless my $m = $s->_clean_method_name($method)
470 0 10 unless my $m = $s->_clean_method_name($method)
485 0 20 unless $name =~ /$safe_start/u
486 0 20 unless $name =~ /$safe_end/u
489 0 20 unless $clean =~ /$safe_start/u
552 123 0 if (@raw_conditions == 1 and not ref $raw_conditions[0]) { }
558 0 123 if $DEBUG_FIND_CONDITIONS
563 0 119 if $DEBUG_FIND_AFTER_DEFAULTS
568 0 119 if ($DEBUG_PRE_FIND_DUMP)
575 18 188 if ($_->{'keep_all'})
580 0 119 if ($DEBUG_FIND_DUMP)
582 0 0 if $DEBUG_FIND_DUMP > 1
585 101 18 unless ($kept_all)
639 25 291 if (s/$is_keep_all//u) { }
28 263 elsif (s/$is_keep//u) { }
646 30 286 if (s/$is_nth_in_group//u) { }
205 81 elsif (s/$is_nth//u) { }
658 12 854 if ($quote eq substr($_, 0, 1) and $quote eq substr($_, -1))
669 197 435 unless @condition
671 193 242 $cond =~ s/^~//u ? :
719 4 119 if not $sections && @$sections or grep {ref $_ ne ref {};} @$sections
725 0 206 if $section->{'keep_all'} and $n < $last
732 0 206 if defined $section->{'nth'} and defined $section->{'nth_in_group'}
748 283 129 if (defined $condition->{$_}) { }
749 155 128 if (ref $condition->{$_} ne ref qr//u)
760 36 376 if (defined $condition->{$_}) { }
772 156 256 if (defined $v and $v =~ /$is_digit/u)
774 152 4 $v >= 0 ? :
785 93 18 unless ($_->{'keep'} or $_->{'keep_all'})
799 0 206 if ($DEBUG_FIND)
817 0 562 if ($DEBUG_FIND)
824 0 4834 if $DEBUG_FIND
826 4834 0 if (defined $try->{'text'})
827 0 4834 if ($DEBUG_FIND) { }
546 5262 elsif ($try->{'tag'} =~ /$need->{'tag'}/u and $try->{'text'} =~ /$need->{'text'}/u and not defined $try->{'keep'}) { }
841 0 546 if $DEBUG_FIND
850 0 546 if $DEBUG_FIND
853 120 426 if ($nth_p and @found + @found_in_group > $nth_p) { }
0 852 elsif ($nth_in_group_p and @found_in_group > $nth_in_group_p) { }
854 0 120 if $DEBUG_FIND
863 0 0 if $DEBUG_FIND
873 1227 3061 if ($try->{'kids'} and not @found_in_group)
874 0 1227 if $DEBUG_FIND
876 8 1219 if ($try->{'keep'} and not $locked_prev++)
882 0 8 if $DEBUG_FIND
884 0 1227 if $DEBUG_FIND
889 0 442 if ($nth_in_group_n and @found_in_group >= abs $nth_in_group_n)
890 0 0 if $DEBUG_FIND
894 186 256 if @found_in_group
898 4 202 if ($nth_n and @found >= abs $nth_n)
899 0 4 if $DEBUG_FIND
903 0 206 if $DEBUG_FIND
920 0 101 if ($DEBUG_INVERT)
933 0 379 if ($DEBUG_INVERT)
941 0 8 if ($DEBUG_INVERT)
945 0 8 if ($prev_node) { }
947 0 0 if ($DEBUG_INVERT)
955 0 8 if ($DEBUG_INVERT)
961 0 379 if $DEBUG_INVERT
978 0 119 if ($DEBUG_RENDER)
992 0 419 if $DEBUG_RENDER
995 0 2839 if $DEBUG_RENDER
998 0 2839 if $DEBUG_RENDER
1000 548 2291 if ($kept_all) { }
387 1904 elsif ($try->{'keep'}) { }
1001 18 530 if ++$n == 1
1002 164 384 if ($try->{'tag'} eq "Para")
1003 0 164 if $DEBUG_RENDER
1009 0 387 if $DEBUG_RENDER
1013 738 2101 if ($try->{'kids'})
1015 0 738 if ($DEBUG_RENDER)
1023 0 119 if $DEBUG_RENDER
1025 50 69 if wantarray
1042 1 5 unless ($term_width)