Branch Coverage

blib/lib/Mojolicious/Plugin/Directory.pm
Criterion Covered Total %
branch 29 32 90.6


line true false branch
54 1 6 if $args->{'dir_page'}
59 2 18 if -f $root->to_string
61 9 9 if (-f $path) { }
9 0 elsif (-d $path) { }
65 1 8 if ($index and my $index_path = locate_index($index, $path))
69 7 1 unless not $auto_index
80 1 0 ref $index eq 'ARRAY' ? :
83 1 0 if -e $path
91 9 3 if ref $handler eq 'CODE'
92 9 3 if $c->tx->res->code
102 6 1 $c->req->url->path eq '/' ? :
116 10 59 if ($is_dir)
121 10 59 $is_dir ? :
137 2 5 if ($json) { }
149 6 56 unless $_[0] =~ /\.([0-9a-zA-Z]+)$/
158 14 69 if $ent eq '.' or $ent eq '..'