Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix a stupid regression
  • Loading branch information
Tadeusz Sośnierz committed Jun 7, 2012
1 parent 4678a6c commit ba20cba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/Bailador.pm
Expand Up @@ -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.();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Bailador/App.pm
Expand Up @@ -32,7 +32,7 @@ class Bailador::App {
for %.routes{$meth}.list -> $r {
next unless $r;
if $uri ~~ $r.key {
return $r;
return $r, $/;
}
}
return;
Expand Down

0 comments on commit ba20cba

Please sign in to comment.