Branch Coverage

blib/lib/Dancer/Route.pm
Criterion Covered Total %
branch 78 88 88.6


line true false branch
45 0 1444 unless defined $self->pattern
49 12 1432 if ref $self->pattern eq "Regexp"
54 1367 76 unless $self->prefix
55 83 1360 if $self->prefix
57 3 1440 if $self->prev
91 1076 649 unless @values
95 698 9 defined $_ ? :
101 2 647 if (my(%captures) = do { no warnings; %+ })
105 2 0 if keys %captures
124 249 398 if (@token_or_splat)
126 0 249 unless $self->{'_params'}
127 232 17 if @tokens
133 274 27 if ($token_or_splat[$i] eq "token")
139 9 18 if ($token_or_splat[$i] eq "megasplat")
144 19 230 @splat ? :
150 17 381 if ($self->{'_should_capture'})
159 26 508 keys %{$self->options;} ? :
164 5 1439 unless defined $self->options
169 1 11 unless grep {/^$opt$/;} @{$_supported_options[0];} or grep {/^$opt$/;} keys %_options_aliases
179 26 0 if exists $_options_aliases{$option}
180 14 12 unless $request->$option and $request->$option =~ /$value/
193 9 111 unless $continuation->isa("Dancer::Continuation::Route")
197 93 18 unless defined $content
206 15 507 if ($response and $response->is_forwarded)
216 15 0 ref $marshalled->[2] eq 'ARRAY' ? :
220 78 429 if ($response and $response->has_passed)
225 77 62 if $self->match($request)
234 413 16 defined $content ? :
236 36 393 defined $response && defined $response->content_type ? :
241 429 0 defined $response ? :
244 429 0 if defined $response
249 393 36 unless grep {/Content-Type/;} @$headers
251 19 410 if ref $content eq "Dancer::Response"
262 9 550 if (Dancer::Config::setting('warnings')) { }
268 3 0 if ($warning)
282 2 81 if ($self->is_regexp) { }
8 73 elsif ($self->pattern eq '/') { }
284 2 0 unless ($regexp =~ /^$prefix/)
320 20 1423 if ($self->is_regexp) { }
338 185 1238 if ($pattern =~ /:/)
340 185 0 if (@params)
349 12 1411 if $pattern =~ s/\*\*/(?#megasplat)([^\n]+)/g
352 88 1335 if $pattern =~ s[\*][(?#splat)([^/]+)]g
355 6 1417 if $pattern =~ /\./