Branch Coverage

blib/lib/Mojolicious/Routes/Route.pm
Criterion Covered Total %
branch 64 68 94.1


line true false branch
26 27 0 if $dynamic
39 4 546 ref $_[0] eq 'ARRAY' ? :
51 189 98 if exists $self->{'has_websocket'}
55 676 17109 $_[0]->inline ? :
63 2813 983 unless @_
64 550 433 ref $_[0] ? :
65 437 546 if @$methods
71 1629 66 unless @_
91 996 2 unless my $parent = $self->parent
108 2430 1001 unless @_
109 995 6 ref $_[0] eq 'ARRAY' ? :
110 980 21 unless @$conditions
122 67 31 unless my(@via) = @{$route->methods // [];}
123 2 29 keys %via ? :
126 8 40 if $via{'POST'} and not $via{'GET'}
127 15 25 $via{'GET'} ? :
134 2 1508 unless @_
137 379 1129 if ($shortcut)
140 5 374 if (ref $shortcut or $shortcut =~ /^[\w:]+$/u) { }
374 0 elsif ($shortcut =~ /^([\w\-:]+)?\#(\w+)?$/u) { }
144 348 26 if defined $1
145 358 16 if defined $2
179 943 560 if (not ref $arg || $pattern) { }
16 544 elsif (not ref $arg and @args) { }
50 494 elsif (not ref $arg) { }
298 196 elsif (ref $arg eq 'CODE') { }
76 120 elsif (ref $arg eq 'ARRAY') { }
120 0 elsif (ref $arg eq 'HASH') { }
198 17 977 $methods eq 'under' ? :
200 50 944 defined $name ? :
209 89 1205 if ($child->has_custom_name) { }
223 0 994 if grep {$self->is_reserved($_);} @{$new_pattern->placeholders;}
227 11 983 if exists $constraints->{'format'}
229 5 989 if exists $defaults->{'format'}