Skip to content

Commit

Permalink
less references to bridges
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 5, 2014
1 parent ffb414a commit fb63177
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/Mojolicious/Routes/Match.pm
Expand Up @@ -71,7 +71,7 @@ sub _match {
$empty = 1;
}
# Endpoint (or bridge)
# Endpoint (or intermediate destination)
if (($endpoint && $empty) || $r->inline) {
push @{$self->stack}, {%$captures};
if ($endpoint && $empty) {
Expand Down
7 changes: 2 additions & 5 deletions lib/Mojolicious/Routes/Route.pm
Expand Up @@ -222,12 +222,9 @@ sub _generate_route {
elsif (ref $arg eq 'HASH') { %defaults = (%defaults, %$arg) }
}

# Create bridge or route
my $route
= $methods eq 'under'
? $self->bridge($pattern, @constraints)
: $self->route($pattern, @constraints)->via($methods);
$route->over(\@conditions)->to(\%defaults);
= $self->route($pattern, @constraints)->over(\@conditions)->to(\%defaults);
$methods eq 'under' ? $route->inline(1) : $route->via($methods);

return defined $name ? $route->name($name) : $route;
}
Expand Down

0 comments on commit fb63177

Please sign in to comment.