Branch Coverage

blib/lib/PERLANCAR/Module/List.pm
Criterion Covered Total %
branch 51 94 54.2


line true false branch
18 0 12 if ($trivial_syntax) { }
32 8 4 if ($options->{'wildcard'})
39 8 0 if (String::Wildcard::Bash::contains_wildcard($part)) { }
42 3 5 if @prefix_parts
48 8 0 if ($has_wildcard)
51 1 7 if $has_globstar
54 0 12 unless $prefix =~ /\A(?:$root_notleaf_rx:: (?:$notroot_notleaf_rx::)*)?\z/x and not $prefix =~ /(?:\A|[^:]::)\.\.?::/
63 0 4 unless $list_modules or $list_prefixes or $list_pod
72 12 28 $prefix eq '' ? :
76 12 28 $prefix eq '' ? :
81 28 52 unless opendir my $dh, $dir
83 48 163 if ($list_modules and $entry =~ /$pm_rx/ or $list_pod and $entry =~ /$pod_rx/) { }
37 142 elsif ($list_prefixes || $recurse and ($entry ne '.' and $entry ne '..') and $entry =~ /$dir_rx/ and -d join('/', $dir, $entry)) { }
87 27 21 if $re_wildcard and not $key =~ /$re_wildcard/
88 0 0 unless $results{$key}
89 0 0 $all ? :
0 19 $return_path ? :
19 2 if $all and $return_path or not exists $results{$key}
97 0 37 if exists $seen_prefixes{$newpfx}
98 0 0 unless $results{$newpfx}
99 0 0 $all ? :
0 13 $return_path ? :
13 24 if $all && $return_path || !exists $results{$newpfx} and $list_prefixes
100 28 9 if $recurse
103 52 0 unless $list_pod and $use_pod_dir
105 0 0 unless opendir $dh, $dir
107 0 0 if ($entry =~ /$pod_rx/)
109 0 0 if $re_wildcard and not $key =~ /$re_wildcard/
110 0 0 unless $results{$key}
0 0 $all ? :
0 0 $return_path ? :
118 2 10 if ($list_prefixes and $re_wildcard)
120 0 6 unless $k =~ /::\z/
122 2 4 unless $k =~ /$re_wildcard/ or $k_nocolon =~ /$re_wildcard/
139 0 8 ref $_[0] eq 'HASH' ? :
148 0 25 if (defined($p = $m{'bash_brace_content'})) { }
10 15 elsif (defined($p = $m{'bash_joker'})) { }
0 15 elsif (defined($p = $m{'literal_brace_single_element'})) { }
4 11 elsif (defined($p = $m{'bash_class'})) { }
0 11 elsif (defined($p = $m{'sql_joker'})) { }
11 0 elsif (defined($p = $m{'literal'})) { }
150 0 0 if $m{'slashes_before_bash_brace'}
151 0 0 if ($opt_brace) { }
155 0 0 unless $2
167 0 10 if ($p eq '?') { }
9 1 elsif ($p eq '*') { }
1 0 elsif ($p eq '**') { }