Branch Coverage

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


line true false branch
51 1 28 if ($location eq '')
53 0 1 if exists $self->{'_mapping_not_found'} and defined $self->{'_mapping_not_found'}
59 5 23 if ($location =~ m[^https?://(.*?)(/.*)]o)
64 0 28 unless $location =~ m[^/]o
76 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 ) ) )? $/ox)
101 0 15 $3 || $7 ? :
103 4 11 if $quant eq '*'
104 2 13 if $quant eq '+'
105 0 15 if $quant eq '?'
106 2 1 $m ? :
3 12 if $quant eq ','
107 0 6 $n ? :
6 9 if $quant eq ''
119 0 15 if ($path =~ /^\:/o)
132 0 28 if defined $map->[3]
135 13 15 @$params ? :
156 59 0 if ($http_host and $env->{'SERVER_PORT'})
176 1 58 unless ($matched)
178 0 1 unless $self->{'_mapping_not_found'}
186 29 29 if (defined $match->[5])
190 14 20 $_->[1] - 1 > 0 ? :
32 2 ($j = $$matching[$_->[1] - 1][0] - 1) - ($i = $_->[1] - 1 > 0 ? $$matching[$_->[1] - 2][0] : 0) >= 0 ? :
210 39 19 $index ? :
0 58 $script_name ? :
28 10 @path ? :
38 20 $index == @path ? :
229 30 172 if (exists $_keys->{$path})
230 30 0 if ($index < $l) { }
234 0 0 if (defined $_keys->{$path}[3])
242 47 155 if (defined $_named)
245 49 28 $m == -1 ? :
247 57 20 $lm > $l ? :
248 113 55 if ($_ < $l) { }
252 39 16 if (defined $quant->[3])
259 22 55 unless @$matches_
264 151 51 if (defined $_app)
277 1 58 unless @$matches
278 21 37 if @$matches == 1
283 37 56 unless (defined $match)
287 38 18 if ($_->[1] < $match->[1])
290 2 16 if ($_->[1] > $match->[1])
294 5 11 if ($_->[2] < $match->[2])
305 0 55 unless @$matches
306 20 35 if @$matches == 1
312 35 76 unless (defined $match)
316 10 66 if ($_->[1] < $match->[1])
319 63 3 if ($_->[1] > $match->[1])
323 3 0 if ($greedy) { }
324 0 3 if ($_->[3][$index - 1][0] > $match->[3][$index - 1][0])
330 0 0 if ($_->[3][$index - 1][0] < $match->[3][$index - 1][0])