Branch Coverage

blib/lib/Mojolicious/Plugin/DirectoryServer.pm
Criterion Covered Total %
branch 34 36 94.4


line true false branch
60 1 7 if $args->{'dir_page'}
65 2 25 if -f $root->to_string
67 2 23 if ($c->req->url->path =~ m[\/\.\.(/|\z)]nu)
73 11 12 if (-f $path) { }
11 1 elsif (-d $path) { }
77 1 10 if ($index and my $index_path = locate_index($index, $path))
81 1 9 if ($c->req->url->path ne "/" and not $c->req->url->path->trailing_slash)
86 8 1 if ($auto_index) { }
101 1 0 ref $index eq 'ARRAY' ? :
104 1 0 if -e $path
109 10 4 if ref $handler eq "CODE"
110 10 4 if $c->tx->res->code
115 7 1 $c->req->url->path eq '/' ? :
129 11 76 if ($is_dir)
134 11 76 $is_dir ? :
150 2 6 if ($json) { }
162 6 70 unless $_[0] =~ /\.([0-9a-zA-Z]+)$/u
171 16 87 if $ent eq "." or $ent eq ".."