Branch Coverage

blib/lib/Filesys/Virtual/Chroot.pm
Criterion Covered Total %
branch 17 66 25.7


line true false branch
94 2 0 defined $o{'i'} ? :
2 0 defined $o{'c'} ? :
96 0 2 if (not defined $self->{'c'}) { }
0 2 elsif (-l $self->{'c'}) { }
0 2 elsif (not -d $self->{'c'}) { }
103 2 0 if Cwd::cwd() =~ /(.+)/s
106 0 2 unless chdir $self->{'c'}
114 0 2 unless chdir $current
129 0 0 if $err
136 0 0 if (ref $self ne 'Filesys::Virtual::Chroot') { }
165 1 2 if $str
183 1 0 if $path
188 0 1 if ($path and not $path =~ m[^/]) { }
194 1 0 if ($path) { }
207 0 1 unless chdir $1
211 0 1 if (not $self->lchdir =~ /^$proot.*?/ || $self->{'i'} or not $self->lchdir =~ /^$proot.*?/i and $self->{'i'}) { }
213 0 0 unless chdir $current
220 1 0 $spath ? :
244 0 0 if ($path)
246 0 0 if $path
251 0 0 if (not defined $obj or $obj eq '..' and defined $path and $path eq '/')
258 0 0 if ($path and not $path =~ m[^/]) { }
264 0 0 if ($path) { }
273 0 0 if Cwd::cwd() =~ /(.+)/s
277 0 0 unless (chdir $1)
284 0 0 if (not $self->lchdir =~ /^$proot.*?/ || $self->{'i'} or not $self->lchdir =~ /^$proot.*?/i and $self->{'i'}) { }
285 0 0 unless chdir $current
288 0 0 $obj ? :
0 0 $obj ? :
0 0 $self->rcwd ? :
293 0 0 unless chdir $current
313 1 0 unless ($cwd =~ s/$proot//g)
319 0 0 $cwd ? :