| lib/Plack/Middleware/DirIndex/Htaccess.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| branch | 13 | 16 | 81.2 |
| line | true | false | branch |
|---|---|---|---|
| 16 | 8 | 2 | unless -f $htaccess_file |
| 18 | 0 | 2 | unless open my $fh, "<:encoding(UTF-8)", $htaccess_file |
| 26 | 2 | 0 | if ($content =~ /^DirectoryIndex\s(.*?)$/) |
| 36 | 0 | 4 | unless $self->root |
| 37 | 2 | 2 | unless $self->dir_index |
| 44 | 10 | 4 | if ($env->{'PATH_INFO'} =~ m[/$]) |
| 47 | 4 | 6 | if (not $index and -f $dir . $self->dir_index) |
| 52 | 6 | 8 | if ($index) |