Branch Coverage

blib/lib/Path/Abstract/Underload.pm
Criterion Covered Total %
branch 84 94 89.3


line true false branch
76 2 1123 ref $_ && (ref $_ eq 'Path::Abstract::Underload' || &blessed($_) && $_->isa('Path::Abstract::Underload')) ? :
77 1073 52 length $_ ? :
79 3 1114 ref $_ eq 'ARRAY' ? :
88 786 0 unless $path eq './'
91 755 31 unless $path eq '/'
92 110 676 if $path ne '/' and $trailing
94 523 263 unless $leading
122 11 8 if $Path::Abstract::_0_093_warn
129 7 4 unless $self->is_tree
141 11 12 if $Path::Abstract::_0_093_warn
148 0 4 if $Path::Abstract::_0_093_warn
155 11 8 if $Path::Abstract::_0_093_warn
161 11 11 if $Path::Abstract::_0_093_warn
167 11 54 if $self->is_empty
169 0 54 if 1 == @path and '' eq $path[0]
171 25 29 if (0 > $index) { }
19 10 elsif (not defined $path[0] && length $path[0]) { }
177 6 48 if $index >= @path
178 3 45 if $index == @path - 1 and not defined $path[$index] or not length $path[$index]
179 3 45 unless defined $path[$index] and length $path[$index]
216 0 10 unless @_
225 0 30 if (@_ and not defined $_[0]) { }
26 4 elsif (ref $_[0] eq '') { }
233 5 25 if (ref $_[0] eq 'HASH') { }
241 1 29 if ('*' eq $matcher)
244 0 30 if (ref $matcher eq 'Regexp') { }
30 0 elsif ($matcher eq '' or $matcher =~ /^\d+$/) { }
254 10 20 if (not defined $extension) { }
255 2 8 if $self->is_empty or $self->is_root
259 5 15 if ('' eq $extension) { }
3 12 elsif (not $extension =~ /^\./) { }
265 6 14 if ($self->is_empty or $self->is_root) { }
269 13 1 if ($ending =~ s/$matcher/$extension/) { }
289 0 190 if $self->is_empty
291 57 133 unless defined $count
293 84 106 if ($count =~ s/([\^\$\*])$//)
294 64 20 if $1 ne '$'
295 52 32 if $1 ne '^'
297 138 52 unless $re
298 24 166 unless length $count
305 262 11 if ($$self =~ s/$re//) { }
307 262 0 if $popped
308 86 176 unless (length $$self)
309 32 54 if ($greedy_lead) { }
374 13 137 if $self->is_empty
381 16 53 if $self->is_empty
414 0 5 if ($@) { }