Skip to content

Commit

Permalink
explain how destinations work
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 16, 2014
1 parent e64b093 commit 19f19d4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -554,6 +554,14 @@ operations to finish before reaching the next dispatch cycle.
});
$foo->get('/bar')->to('foo#bar');

Every destination is just a snapshot of the stash at the time the route
matched, and only the C<format> value is shared by all of them. For a little
more power you can introspect the preceding and succeeding destinations with
L<Mojolicious::Controller/"match">.

# Action of the fourth dispatch cycle
my $action = $c->match->stack->[3]{action};

=head2 Formats

File extensions like C<.html> and C<.txt> at the end of a route are
Expand Down

0 comments on commit 19f19d4

Please sign in to comment.