Branch Coverage

blib/lib/Mojolicious/Plugin/Util/Endpoint.pm
Criterion Covered Total %
branch 42 50 84.0


line true false branch
29 1 13 if (exists $endpoints{$name})
55 55 4 ref $values ? :
66 54 0 $c->isa('Mojolicious::Controller') ? :
72 7 47 unless (defined $endpoints{$name})
75 1 6 unless ($name =~ m[^([^:]+:)?/?/]u)
84 8 39 if (&blessed($endpoints{$name}) and $endpoints{$name}->isa('Mojo::URL'))
96 0 39 unless ($match = $c->match)
112 6 33 if $param->{'scheme'}
113 2 37 if $param->{'port'}
115 18 21 if ($param->{'host'})
117 16 2 unless $param->{'port'}
118 12 6 unless $url->scheme
122 28 11 if $param->{'query'}
139 19 52 if ($t eq 'slash') { }
32 20 elsif ($t eq 'text') { }
20 0 elsif ($t =~ /^(?:wildcard|placeholder|relaxed)$/u) { }
152 20 0 ref $part->[1] eq 'ARRAY' ? :
154 0 20 if (exists $values{$part->[1]}) { }
171 39 0 if @parts
174 0 39 if !$name || $name eq 'current' and $req->url->path->trailing_slash
229 37 80 if ($param->{$val}) { }
3 77 elsif (exists $orig_param->{$val}) { }
239 2 1 if (s/(?<=[\&\?])[^\}][^=]*?=\{$val\??\}//gu)
254 7 46 if (exists $param->{'?'} and not defined $param->{'?'})
257 0 7 unless s/(?<=[\&\?])[^\}][^=]*?=\{[^\?\}]+?\?\}//gu