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 17065 $_[0]->inline ? :
63 2795 980 unless @_
64 550 430 ref $_[0] ? :
65 434 546 if @$methods
71 1618 66 unless @_
91 993 2 unless my $parent = $self->parent
108 2420 998 unless @_
109 992 6 ref $_[0] eq 'ARRAY' ? :
110 977 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 1505 unless @_
137 379 1126 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 940 559 if (not ref $arg || $pattern) { }
16 543 elsif (not ref $arg and @args) { }
50 493 elsif (not ref $arg) { }
298 195 elsif (ref $arg eq 'CODE') { }
76 119 elsif (ref $arg eq 'ARRAY') { }
119 0 elsif (ref $arg eq 'HASH') { }
198 17 974 $methods eq 'under' ? :
200 50 941 defined $name ? :
209 89 1204 if ($child->has_custom_name) { }
223 0 991 if grep {$self->is_reserved($_);} @{$new_pattern->placeholders;}
227 11 980 if exists $constraints->{'format'}
229 5 986 if exists $defaults->{'format'}