Branch Coverage

blib/lib/PAGI/App/Directory.pm
Criterion Covered Total %
branch 34 38 89.4


line true false branch
38 1 17 unless defined $str
50 1 7 unless defined $str
64 3 6 if $scope->{'type'} ne "http"
72 2 4 if (not $real_dir or index($real_dir, $real_root) != 0)
78 3 1 if (-d $dir_path)
81 0 6 if (-f "File::Spec"->catfile($dir_path, $index))
87 3 0 unless ($has_index)
101 0 3 unless (opendir my $dh, $dir_path)
108 3 10 if $entry eq "."
109 3 7 if not $self->{'show_hidden'} and $entry =~ /^\./
113 2 5 -d $full_path ? :
123 0 4 unless $PAGI::App::Directory::b->{'is_dir'} <=> $PAGI::App::Directory::a->{'is_dir'}
127 1 2 if ($accept =~ m[application/json])
139 1 1 $rel_path eq '' ? :
151 1 1 if ($rel_path ne "")
157 1 3 $entry->{'is_dir'} ? :
158 1 3 $entry->{'is_dir'} ? :
159 1 3 $entry->{'is_dir'} ? :
179 1 2 if $size == 0