Branch Coverage

blib/lib/Dancer2/Core/Route.pm
Criterion Covered Total %
branch 69 76 90.7


line true false branch
49 0 587 unless defined $options
57 0 3 unless grep {/^$opt$/;} @supported_options
89 1088 136 if ($self->has_options)
90 3 1085 unless $self->validate_options($request)
95 636 585 unless @values
99 2 583 if (my(%captures) = %+)
108 86 497 if (@token_or_splat)
117 106 1 if (defined $token_or_splat[$i])
118 13 93 if ($token_or_splat[$i] eq "typed_token")
121 11 2 if (defined $values[$i])
125 3 8 unless $type->check($values[$i])
130 29 64 if ($token_or_splat[$i] eq "token")
136 25 39 if ($token_or_splat[$i] eq "megasplat")
137 24 1 defined $values[$i] ? :
150 3 494 if ($self->_should_capture)
168 1 447 if $RESPONSE->has_content and not ref $content
171 446 1 unless my $type = &blessed($content)
175 0 1 if $type eq "Plack::Response"
181 0 1 if $type eq "CODE"
186 0 1 if $type eq "Dancer2::Core::Response"
189 1 0 if $type eq "Dancer2::Core::Response::Delayed"
206 3 655 if ($type_library)
207 0 3 unless eval {
213 32 626 if ($prefix) { }
619 7 elsif (not XXX) { }
215 1 31 XXX ? :
220 6 613 unless index($regexp, "/", 0) == 0
227 8 650 if (XXX) { }
248 53 597 if ($string =~ /:/)
251 15 44 if ($token =~ s/\[(.+)\]$//) { }
261 13 39 if (@typed_params)
265 40 12 if (@params)
267 1 39 if &first(sub {
270 1 39 if &first(sub {
280 26 623 if $string =~ s/\*\*/(?#megasplat)([^\n]+)/g
283 29 620 if $string =~ s[\*][(?#splat)([^/]+)]g
286 1 648 if $string =~ /\./
301 3 3 unless $request->$option and $request->$option =~ /$self->options->{$option}/