Skip to content

Commit

Permalink
Merge pull request #1188 from PerlDancer/bigpresh/issue_1187_route_ma…
Browse files Browse the repository at this point in the history
…tching

Route matching problems if %+ already populated (issue 1187)
  • Loading branch information
bigpresh authored Jun 13, 2018
2 parents 28d2fdc + 6292fce commit 51e4206
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/Dancer/Route.pm
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,13 @@ sub match {

my @values = $path =~ $self->{_compiled_regexp};

Dancer::Logger::core(" --> got ".
map { defined $_ ? $_ : 'undef' } @values)
if @values;
return unless @values;

Dancer::Logger::core(
" --> got " .
map { defined $_ ? $_ : 'undef' } @values
);


# if some named captures found, return captures
# no warnings is for perl < 5.10
Expand All @@ -103,7 +107,6 @@ sub match {
return $self->save_match_data($request, {captures => \%captures});
}

return unless @values;

# save the route pattern that matched
# TODO : as soon as we have proper Dancer::Internal, we should remove
Expand Down

0 comments on commit 51e4206

Please sign in to comment.