Branch Coverage

blib/lib/PAGI/App/Directory.pm
Criterion Covered Total %
branch 23 38 60.5


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