Skip to content

Commit

Permalink
more diverse examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 6, 2014
1 parent ca8de7f commit 9381472
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -537,7 +537,7 @@ Broken dispatch chains can be continued by calling the method
L<Mojolicious::Controller/"continue">, this allows for example non-blocking
operations to finish before reaching the next dispatch cycle.

my $foo = $r->under('/foo' => sub {
my $maybe = $r->under('/maybe' => sub {
my $c = shift;

# Wait 3 seconds and then give visitors a 50% chance to continue
Expand All @@ -552,7 +552,7 @@ operations to finish before reaching the next dispatch cycle.

return undef;
});
$foo->get('/bar')->to('foo#bar');
$maybe->get('/')->to('maybe#winner');

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
Expand Down

0 comments on commit 9381472

Please sign in to comment.