++ed by:

3 non-PAUSE users.

Nordaaker AS
and 1 contributors

NAME

Parallol - Because parallel requests should be as fun as parallololololol!

SYNOPSIS

  my $p = Parallol->new;
  my $ua = Mojo::UserAgent->new;

  my $titles = {};

  $p->on_done(sub {
    say $titles;
  });

  $ua->get('http://bbc.co.uk/', $p->do(sub {
    $titles->{bbc} = pop->res->dom->at('title')->text;
  }));

  $ua->get('http://mojolicio.us/', $p->do(sub {
    $titles->{mojo} = pop->res->dom->at('title')->text;
  }));

DESCRIPTION

Basic action for tracking parallel requests and running callbacks after the last request completes. See Mojolicious::Plugin::Parallel for a more concrete implementation of this technique.

METHODS

do

Wrap a request in a callback, and track parallel count.

SEE ALSO

Mojolicious, Mojolicious::Plugin::Parallol

AUTHOR

Magnus Holm mailto:magnus@nordaaker.com

LICENSE

This software is licensed under the same terms as Perl itself.