Branch Coverage

blib/lib/MojoX/DirectoryListing.pm
Criterion Covered Total %
branch 80 106 75.4


line true false branch
31 5 19 if (@_ % 2 == 1)
43 0 28 unless ($route =~ m[^/])
53 9 19 unless $icon_server_set{$caller}++
61 10 18 if ($options{'recursive'})
66 42 20 if $_ ne "." and $_ ne ".."
70 3 7 $route eq '/' ? :
72 1 3 if ($local) { }
74 0 1 if $realpaths{$real}++
83 6 22 if ($local)
100 0 9 if (not -r "$local/$file") { }
1 8 elsif (-d "$local/$file") { }
8 0 elsif (open my $fh, '<', "$local/$file") { }
108 7 1 if ($type) { }
110 5 2 if ($format and $format =~ /te?xt/i) { }
0 2 elsif ($format) { }
128 0 28 unless $route =~ m[^/]
156 0 32 if ($sort_column =~ /^(\w);O=(\w)/)
170 19 13 unless $virtual_dir eq "/"
172 0 32 unless (opendir $dh, $actual_dir)
175 0 0 if (-d $actual_dir) { }
187 93 106 if $is_dir
195 93 106 $is_dir ? :
205 4 28 if ($sort_column eq 'S') { }
2 26 elsif ($sort_column eq 'M') { }
3 23 elsif ($sort_column eq 'T') { }
207 0 40 unless $MojoX::DirectoryListing::a->{'size'} <=> $MojoX::DirectoryListing::b->{'size'}
210 0 0 unless $MojoX::DirectoryListing::a->{'modtime'} <=> $MojoX::DirectoryListing::b->{'modtime'}
213 0 28 unless $MojoX::DirectoryListing::a->{'type'} cmp $MojoX::DirectoryListing::b->{'type'}
217 5 27 if ($sort_order eq "D")
249 28 132 unless $show
252 31 101 if ($sort_column eq $col_code)
253 5 26 if ($sort_order eq 'D') { }
260 10 122 if ($text eq 'Icon') { }
278 32 167 if $item->{'name'} eq "."
279 0 167 if $item->{'forbidden'} and not $show_forbidden
282 62 105 if ($show_icon)
288 0 167 if ($item->{'forbidden'}) { }
293 32 135 if $name eq ".."
301 155 12 if ($show_file_time)
305 156 11 if ($show_file_size)
309 157 10 if ($show_file_type)
317 2 30 if ($self->stash("footer"))
333 2 30 if (defined $stylesheet and not ref $stylesheet)
338 29 1 if (not defined $stylesheet) { }
0 1 elsif (ref $stylesheet eq 'ARRAY') { }
0 1 elsif (ref $stylesheet eq 'HASH') { }
1 0 elsif (ref $stylesheet eq 'SCALAR') { }
379 58 98 if ($item->{'is_dir'})
383 98 0 if ($s < 100000)
386 0 0 if ($s < 1023488)
389 0 0 if ($s < "1048051712")
392 0 0 if ($s < "1073204953088")
409 103 3 if ($file =~ s/.*\.//)