Branch Coverage

blib/lib/Dir/ls.pm
Criterion Covered Total %
branch 67 96 69.7


line true false branch
22 1 18 if (ref $_[0] eq 'HASH') { }
27 2 17 unless defined $dir and length $dir
28 2 17 unless $opt
36 0 19 unless opendir my $dh, $dir
38 0 19 unless closedir $dh
43 3 16 defined $options{'hide'} ? :
44 0 19 defined $options{'I'} ? :
45 3 16 defined $ignore_glob ? :
47 37 190 defined $ignore_pattern ? :
112 98 $show_almost_all ? :
56 210 $show_all ? :
14 214 $skip_backup ? :
227 1 if $show_all ? 1 : ($show_almost_all ? $_ ne '.' && $_ ne '..' : !/^\./ && (defined $hide_pattern ? !/$hide_pattern/ : 1)) and $skip_backup ? !/~\z/ : 1
54 0 19 if ($options{'U'} or $options{'f'} or $sort eq 'none') { }
1 18 elsif ($options{'v'} or $sort eq 'version') { }
1 17 elsif ($options{'S'} or $sort eq 'size') { }
1 16 elsif ($options{'X'} or $sort eq 'extension') { }
0 16 elsif ($options{'t'} or $sort eq 'time') { }
0 16 elsif ($options{'c'}) { }
0 16 elsif ($options{'u'}) { }
0 16 elsif (defined $options{'sort'}) { }
74 19 0 unless ($sort eq 'U')
75 1 18 if ($sort eq 'v') { }
84 1 17 if ($sort eq 'S') { }
1 16 elsif ($sort eq 'X') { }
0 16 elsif ($sort eq 't') { }
0 16 elsif ($sort eq 'c') { }
0 16 elsif ($sort eq 'u') { }
103 3 16 if $options{'r'} or $options{'reverse'}
105 2 17 if ($options{'group-directories-first'})
107 2 22 S_ISDIR(_stat($_, $dir, \%stat)->mode) ? :
113 0 19 if ($indicators eq 'none') { }
1 18 elsif ($options{'p'} or $indicators eq 'slash') { }
0 18 elsif ($options{'file-type'} or $indicators eq 'file-type') { }
0 18 elsif ($options{'F'} or $options{'classify'} or $indicators eq 'classify') { }
0 18 elsif (defined $options{'indicator-style'}) { }
125 1 18 if (length $indicators)
128 1 10 if (S_ISDIR($mode)) { }
0 10 elsif ($indicators eq 'f' or $indicators eq 'F') { }
131 0 0 if (S_ISLNK($mode)) { }
0 0 elsif (S_ISSOCK($mode)) { }
0 0 elsif (S_ISFIFO($mode)) { }
0 0 elsif ($indicators eq 'F' and $mode & 64) { }
149 0 47 unless defined $entry and length $entry
150 0 47 if exists $cache->{$entry}
153 0 47 unless ($stat)
157 0 47 unless $stat
164 23 67 unless defined $ext