Branch Coverage

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


line true false branch
49 0 594 unless defined $options
57 0 3 unless grep {/^$opt$/;} @supported_options
89 1093 250 if ($self->has_options)
90 3 1090 unless $self->validate_options($request)
95 748 592 unless @values
99 2 590 if (my(%captures) = %+)
108 86 504 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 501 if ($self->_should_capture)
168 1 453 if $RESPONSE->has_content and not ref $content
171 452 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 665 if ($type_library)
207 0 3 unless eval {
213 34 634 if ($prefix) { }
627 7 elsif (not XXX) { }
215 1 33 XXX ? :
220 6 621 unless index($regexp, "/", 0) == 0
227 8 660 if (XXX) { }
248 53 607 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 38 if &first(sub {
280 26 631 if $string =~ s/\*\*/(?#megasplat)([^\n]+)/g
283 29 628 if $string =~ s[\*][(?#splat)([^/]+)]g
286 1 656 if $string =~ /\./
301 3 1 unless $request->$option and $request->$option =~ /$self->options->{$option}/