Branch Coverage

blib/lib/Mojo/Path.pm
Criterion Covered Total %
branch 40 40 100.0


line true false branch
14 12 1439 if (not length $parts->[$i] or $parts->[$i] eq '.' or $parts->[$i] eq '...') { }
1421 18 elsif ($i < 1 or $parts->[$i] ne '..' or $$parts[$i - 1] eq '..') { }
19 911 86 @$parts ? :
26 741 2059 if (exists $self->{'charset'})
27 153 2647 if (my $parts = $self->{'parts'}) { }
36 241 4 unless $_[1] eq "/"
44 3770 384 if $path =~ m[^/]u
47 367 17 unless $self->trailing_slash
53 600 7741 @_ > 1 ? :
66 794 12 $path =~ m[^/]u ? :
71 67 2 unless $clone->trailing_slash
77 27 1238 $clone->trailing_slash ? :
85 1992 1792 if (defined(my $path = $self->{'path'}))
86 1991 1 if $charset
92 1789 3 if $charset
94 1478 314 if $self->leading_slash
95 63 1729 if $self->trailing_slash
104 4657 10830 unless ($self->{'parts'})
107 4655 2 if $charset
113 13582 1905 unless @_