Branch Coverage

blib/lib/Apache2/SSI/File.pm
Criterion Covered Total %
branch 39 70 55.7


line true false branch
23 0 15 if ($ENV{'MOD_PERL'})
48 0 8 unless defined $file and length $file
50 8 0 unless length $self->{'base_dir'}
55 0 8 unless $self->SUPER::init(@_)
58 3 5 if (length $self->{'base_file'}) { }
4 1 elsif (not length $self->{'base_dir'}) { }
60 0 3 if (-d $self->{'base_file'}) { }
77 0 8 unless $self->filename($file)
101 0 11 if ($r) { }
103 0 0 if @_
108 2 9 if @_
118 9 9 if (@_)
121 0 9 unless defined $newfile and length $newfile
125 0 18 if ($r) { }
127 0 0 if (defined $newfile) { }
0 0 elsif (not length $self->{'filename'}) { }
130 0 0 $r->is_initial_req ? :
134 0 0 if ($rr->status == 'Apache2::Const::HTTP_OK' and $rr->finfo and $rr->finfo->filetype != 'APR::Const::FILETYPE_NOFILE') { }
142 0 0 if ($finfo)
165 9 9 if (defined $newfile)
168 5 4 unless substr($base_dir, -1, 1) eq '/'
176 2 7 unless ($finfo->exists)
195 9 16 if (@_) { }
0 16 elsif (not $self->{'finfo'}) { }
198 0 9 unless defined $newfile and length $newfile
204 0 0 unless $newfile
207 9 16 if (defined $newfile)
209 0 9 $r ? :
211 0 9 unless $self->{'finfo'}
212 0 9 unless $self->{'finfo'}
226 0 1 unless scalar @segments
228 0 1 $r ? :
235 4 9 if (@_)
239 0 4 if (&Scalar::Util::blessed($this) and $this->isa('URI::file')) { }
1 3 elsif (substr($this, 0, 1) ne '/') { }