Branch Coverage

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


line true false branch
14 12 1355 if (not length $parts->[$i] or $parts->[$i] eq '.' or $parts->[$i] eq '...') { }
1337 18 elsif ($i < 1 or $parts->[$i] ne '..' or $$parts[$i - 1] eq '..') { }
19 835 85 @$parts ? :
26 698 1905 if (exists $self->{'charset'})
27 152 2451 if (my $parts = $self->{'parts'}) { }
36 242 4 unless $_[1] eq "/"
44 3459 351 if $path =~ m[^/]u
47 335 16 unless $self->trailing_slash
53 561 7084 @_ > 1 ? :
66 809 12 $path =~ m[^/]u ? :
71 67 2 unless $clone->trailing_slash
77 27 1156 $clone->trailing_slash ? :
85 1975 1563 if (defined(my $path = $self->{'path'}))
86 1974 1 if $charset
92 1560 3 if $charset
94 1257 306 if $self->leading_slash
95 63 1500 if $self->trailing_slash
104 4195 9634 unless ($self->{'parts'})
107 4193 2 if $charset
113 12186 1643 unless @_