Permalink
Browse files

Fix a stupid regression

  • Loading branch information...
1 parent 4678a6c commit ba20cbac928c7866d72516775e4ac832a97d4f9e @tadzik tadzik committed Jun 7, 2012
Showing with 5 additions and 5 deletions.
  1. +4 −4 lib/Bailador.pm
  2. +1 −1 lib/Bailador/App.pm
View
@@ -62,13 +62,13 @@ our sub dispatch_request(Bailador::Request $r) {
sub dispatch($env) {
$app.context.env = $env;
- my $r = $app.find_route($env);
+ my ($r, $match) = $app.find_route($env);
if $r {
status 200;
- if $/ {
- unless $/[0] { $/ = $/<_capture> }
- $app.response.content = $r.value.(|$/.list);
+ if $match {
+ unless $match[0] { $match = $match<_capture> }
+ $app.response.content = $r.value.(|$match.list);
} else {
$app.response.content = $r.value.();
}
View
@@ -32,7 +32,7 @@ class Bailador::App {
for %.routes{$meth}.list -> $r {
next unless $r;
if $uri ~~ $r.key {
- return $r;
+ return $r, $/;
}
}
return;

0 comments on commit ba20cba

Please sign in to comment.