Branch Coverage

blib/lib/Path/Class/Dir.pm
Criterion Covered Total %
branch 84 98 85.7


line true false branch
29 1 426 if @_ == 1 and not defined $_[0]
33 24 394 !ref($_[0]) && $_[0] eq '' ? :
8 418 @_ == 0 ? :
39 217 209 if (&Scalar::Util::blessed($first) and $first->isa('Path::Class::Dir')) { }
45 38 171 $dirs eq $s->rootdir ? :
50 0 116 &Scalar::Util::blessed($_) && $_->isa('Path::Class::Dir') ? :
73 1 98 $_ eq $u ? :
88 1 112 if $_[0]{'file_spec_class'}
97 23 9 unless @_
100 5 4 if ($offset < 0)
102 2 2 wantarray ? :
4 5 unless @_
105 2 3 if ($length < 0)
124 11 20 if ($self->is_absolute) { }
2 18 elsif ($self eq $curdir) { }
1 17 elsif (not grep({$_ ne $updir;} @$dirs)) { }
4 13 elsif (@$dirs == 1) { }
126 10 1 if @$dirs > 1
150 22 0 length $rel ? :
192 0 6 unless my $callback = $opts{'callback'}
202 5 0 unless (($ret || '') eq $self->PRUNE)
210 16 2 unless (($ret || '') eq $self->PRUNE)
218 4 1 $opts{'preorder'} ? :
1 5 $opts{'depthfirst'} && $opts{'preorder'} ? :
222 28 20 if ($entry->is_dir) { }
234 0 51 unless my $dh = $self->open
238 102 80 if not $opts{'all'} and $self->_is_local_dot_dir($entry)
239 0 80 if $opts{'no_hidden'} and $entry =~ /^\./
241 45 35 if -d $out[-1]
255 2 8 unless ($self->{'dh'})
256 0 2 unless $self->{'dh'} = $self->open
260 2 8 unless (defined $next)
268 6 2 if -d $file
273 0 21 if $#_ > 2
275 0 21 unless $other
277 7 14 unless eval { do { $other->isa('Path::Class::Entity') } }
278 2 19 unless $other->is_dir
280 8 13 if ($self->is_absolute) { }
0 13 elsif ($other->is_absolute) { }
289 1 20 if ($self->volume or $other->volume)
290 0 1 unless $other->volume eq $self->volume
295 4 17 if join($", @{$self->{'dirs'};}) eq join($", @{$self->new('')->{'dirs'};})
298 8 9 if ($self eq $self->_spec->curdir)
304 1 15 if $i > $#{$$other{'dirs'};}
305 3 12 if $self->{'dirs'}[$i] ne $other->{'dirs'}[$i]
312 0 8 if $#_ > 2
314 0 8 unless $other
315 2 6 unless -d $self and -e $other || -l $other
317 0 6 unless eval { do { $other->isa('Path::Class::Entity') } }