Skip to content

Commit

Permalink
improved route matching performance further
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 10, 2013
1 parent 7c78bca commit f61a6e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Mojolicious/Routes/Pattern.pm
Expand Up @@ -28,7 +28,7 @@ sub match_partial {

# Match
return undef unless my @captures = $$pathref =~ $regex;
$$pathref = $';
$$pathref = ${^POSTMATCH};

# Merge captures
my $captures = {%{$self->defaults}};
Expand Down Expand Up @@ -152,7 +152,7 @@ sub _compile {
# Not rooted with a slash
$regex = "$block$regex" if $block;

return $self->regex(qr/^$regex/s)->regex;
return $self->regex(qr/^$regex/ps)->regex;
}

sub _compile_format {
Expand Down

0 comments on commit f61a6e3

Please sign in to comment.