Branch Coverage

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


line true false branch
49 0 593 unless defined $options
57 0 3 unless grep {/^$opt$/;} @supported_options
89 1092 136 if ($self->has_options)
90 3 1089 unless $self->validate_options($request)
95 637 588 unless @values
99 2 586 if (my(%captures) = %+)
108 86 500 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 497 if ($self->_should_capture)
168 1 449 if $RESPONSE->has_content and not ref $content
171 448 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 661 if ($type_library)
207 0 3 unless eval {
213 32 632 if ($prefix) { }
625 7 elsif (not XXX) { }
215 1 31 XXX ? :
220 6 619 unless index($regexp, "/", 0) == 0
227 8 656 if (XXX) { }
248 53 603 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 629 if $string =~ s/\*\*/(?#megasplat)([^\n]+)/g
283 29 626 if $string =~ s[\*][(?#splat)([^/]+)]g
286 1 654 if $string =~ /\./
301 3 3 unless $request->$option and $request->$option =~ /$self->options->{$option}/