Branch Coverage

blib/lib/Test/Directory.pm
Criterion Covered Total %
branch 69 70 98.5


line true false branch
26 12 3 if (defined $dir) { }
28 2 10 unless CORE::mkdir $dir
49 21 172 @path ? :
54 151 5 defined $file ? :
64 1 8 unless sysopen my $fh, $path, 193
74 2 3 unless sysopen my $fh, $path, 193
79 1 2 if (defined $opt{'content'})
82 1 2 if (defined $opt{'time'})
91 1 9 unless CORE::mkdir $path
98 10 5 if (-f $self->path($file)) { }
109 5 4 if (-d $self->path($dir)) { }
143 1 3 unless opendir my $dh, $$self{'dir'}
147 3 14 if $file eq '.'
148 3 11 if $file eq '..'
149 7 4 if $$path{$file}
160 1 7 if $has and not -f $self->path($file)
163 1 2 if $has and not -d $self->path($file)
186 2 1 if rmdir $path
197 4 2 unless defined $text
203 3 2 unless defined $text
209 3 1 unless defined $text
215 2 1 unless defined $text
226 1 8 unless opendir my $dh, $dir
229 8 22 if $file eq '.'
230 8 14 if $file eq '..'
231 11 3 if $$path{$file}
238 0 4 unless opendir my $dh, $self->path($dir)
241 4 8 if $file eq '.'
242 4 4 if $file eq '..'
244 3 1 if $$path{$name}
253 2 7 unless defined $name
257 1 13 if ($has and not -f $self->path($file))
263 2 6 if ($has and not -d $self->path($file))
275 4 4 if ($has and -d $dir)
281 4 4 unless ($rv)