Skip to content

Commit

Permalink
no need to use the yada yada operator in the cookbook
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 31, 2014
1 parent 8c79010 commit f323521
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

5.57 2014-10-30
5.57 2014-10-31

5.56 2014-10-29
- Deprecated Mojo::Collection::AUTOLOAD in favor of Mojo::Collection::pluck.
Expand Down
7 changes: 4 additions & 3 deletions lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -1077,11 +1077,11 @@ can keep many concurrent connections active at the same time.
my $ua = Mojo::UserAgent->new;
$ua->get('http://metacpan.org/search?q=mojo' => sub {
my ($ua, $mojo) = @_;
...
say $mojo->res->dom->at('title')->text;
});
$ua->get('http://metacpan.org/search?q=minion' => sub {
my ($ua, $minion) = @_;
...
say $minion->res->dom->at('title')->text;
});

# Start event loop if necessary
Expand All @@ -1101,7 +1101,8 @@ synchronize multiple non-blocking requests.
my $ua = Mojo::UserAgent->new;
my $delay = Mojo::IOLoop->delay(sub {
my ($delay, $mojo, $minion) = @_;
...
say $mojo->res->dom->at('title')->text;
say $minion->res->dom->at('title')->text;
});
$ua->get('http://metacpan.org/search?q=mojo' => $delay->begin);
$ua->get('http://metacpan.org/search?q=minion' => $delay->begin);
Expand Down

0 comments on commit f323521

Please sign in to comment.