Skip to content

Commit

Permalink
show that order is preserved in step example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 17, 2012
1 parent 92565c5 commit aa5ef2b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -333,9 +333,11 @@ L<Mojo::IOLoop> delay.

# Delayed rendering
sub {
my $delay = shift;
my @results = map { $_->res->json->{results}[0]{text} } @_;
$self->render(json => {results => \@results});
my ($delay, $perl, $python) = @_;
$self->render(json => {
perl => $perl->res->json->{results}[0]{text},
python => $python->res->json->{results}[0]{text}
});
}
);
};
Expand Down

0 comments on commit aa5ef2b

Please sign in to comment.