Branch Coverage

blib/lib/Plack/App/URLMux.pm
Criterion Covered Total %
branch 82 100 82.0


line true false branch
47 1 28 if ($location eq '')
49 0 1 if exists $self->{'_mapping_not_found'} and defined $self->{'_mapping_not_found'}
55 5 23 if ($location =~ m[^https?://(.*?)(/.*)]ou)
60 0 28 unless $location =~ m[^/]ou
72 15 15 if ($path =~ /^ \: ([^\:\+\*\?\{\}\,]+?) (?# 1: name of parameter ) (?: (?: (\+|\*|\?) (?# 2: '+|*|?' quantifier ) (\??) (?# 3: '?' greedy|lazy flag ) ) | (?: \{ (\d+) (?# 4: start range quantifier ) (?: (\,) (?# 5: range delimeter ) (\d+)* (?# 6: end range quantifier ) )* \} (\??) (?# 7: '?' greedy|lazy flag ) ) )? $/oux)
97 0 15 $3 || $7 ? :
99 4 11 if $quant eq '*'
100 2 13 if $quant eq '+'
101 0 15 if $quant eq '?'
102 2 1 $m ? :
3 12 if $quant eq ','
103 0 6 $n ? :
6 9 if $quant eq ''
115 0 15 if ($path =~ /^\:/ou)
128 0 28 if defined $map->[3]
131 13 15 @$params ? :
145 59 0 if ($http_host and $env->{'SERVER_PORT'})
165 1 58 unless ($matched)
167 0 1 unless $self->{'_mapping_not_found'}
175 29 29 if (defined $match->[5])
179 14 20 $_->[1] - 1 > 0 ? :
32 2 ($j = $$matching[$_->[1] - 1][0] - 1) - ($i = $_->[1] - 1 > 0 ? $$matching[$_->[1] - 2][0] : 0) >= 0 ? :
199 39 19 $index ? :
0 58 $script_name ? :
28 10 @path ? :
38 20 $index == @path ? :
217 30 172 if (exists $_keys->{$path})
218 30 0 if ($index < $l) { }
222 0 0 if (defined $_keys->{$path}[3])
230 47 155 if (defined $_named)
233 49 28 $m == -1 ? :
235 57 20 $lm > $l ? :
236 113 55 if ($_ < $l) { }
240 39 16 if (defined $quant->[3])
247 22 55 unless @$matches_
252 151 51 if (defined $_app)
264 1 58 unless @$matches
265 21 37 if @$matches == 1
270 37 56 unless (defined $match)
274 37 19 if ($_->[1] < $match->[1])
277 3 16 if ($_->[1] > $match->[1])
281 2 14 if ($_->[2] < $match->[2])
291 0 55 unless @$matches
292 20 35 if @$matches == 1
298 35 76 unless (defined $match)
302 10 66 if ($_->[1] < $match->[1])
305 63 3 if ($_->[1] > $match->[1])
309 3 0 if ($greedy) { }
310 0 3 if ($_->[3][$index - 1][0] > $match->[3][$index - 1][0])
316 0 0 if ($_->[3][$index - 1][0] < $match->[3][$index - 1][0])