Branch Coverage

lib/Path/Extended/Dir.pm
Criterion Covered Total %
branch 73 84 86.9


line true false branch
11 188 1 @args ? :
32 22 19 $abs ? :
46 1 53 if $self->is_open
49 1 53 unless (opendir my $dh, $self->_absolute)
51 17 36 if $$self{'_compat'} and defined wantarray
61 36 17 if (my $dh = delete $$self{'handle'})
69 1 23 unless $self->is_open
78 1 1 unless $self->is_open
87 1 5 unless $self->is_open
96 1 1 unless $self->is_open
117 1 8 unless $type =~ /^(?:directory|file)$/
125 2 6 if ($options{'callback'})
135 0 29 if $self->is_open
137 28 1 if ($self->exists)
140 0 28 unless (eval { do { File::Path::rmtree($self->_absolute, @args); 1 } })
150 46 1 unless ($self->exists)
153 0 46 unless (eval { do { File::Path::mkpath($self->_absolute); 1 } })
163 4 16 unless $self->is_open
165 4 16 unless (defined $next)
169 11 5 if (-d 'File::Spec'->catdir($self->_absolute, $next)) { }
184 1 2 if -d $file->_absolute
192 1 2 if -f $dir->_absolute
199 0 45 unless my $dh = $self->open
203 90 88 if not $options{'all'} and $entry eq '.' || $entry eq '..'
204 38 50 -d 'File::Spec'->catdir($self->_absolute, $entry) ? :
207 76 12 if ($options{'prune'} or $options{'no_hidden'})
208 6 70 if (ref $options{'prune'} eq 'Regexp') { }
6 64 elsif (ref $options{'prune'} eq 'CODE') { }
209 1 5 if $entry =~ /$options{'prune'}/
212 1 5 if $options{'prune'}($child)
215 3 61 if $entry =~ /^\./
228 0 11 unless my $callback = $opts{'callback'}
251 7 2 $opts{'preorder'} ? :
2 9 $opts{'depthfirst'} && $opts{'preorder'} ? :
255 43 47 if ($entry->is_dir) { }
274 0 11 unless $other
276 8 3 unless UNIVERSAL::isa($other, $class)
277 0 11 unless $other->is_dir
279 0 11 if ($self->volume)
280 0 0 unless $other->volume eq $self->volume
286 0 11 if @my_parts > @other_parts
290 4 41 unless $my_parts[$i] eq $other_parts[$i]