The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

eBay::API::Simple::Parallel - Support for parallel requests

USAGE

  my $pua = eBay::API::Simple::Parallel->new();
 
  my $call1 = eBay::API::Simple::RSS->new( {
    parallel => $pua,
  } );

  $call1->execute(
    'http://worldofgood.ebay.com/Clothes-Shoes-Men/43/list?format=rss',
  );

  my $call2 = eBay::API::Simple::RSS->new( {
    parallel => $pua,
  } );

  $call2->execute(
    'http://worldofgood.ebay.com/Home-Garden/46/list?format=rss'
  );

  $pua->wait();

  if ( $pua->has_error() ) {
    print "ONE OR MORE FAILURES!\n";
  }

  print $call1->request_content() . "\n";
  print $call2->response_content() "\n";
  

PUBLIC METHODS

new()

  my $pua = ebay::API::Simple::Parallel->new();

wait( $timeout )

  $pua->wait();

This method will wait for all requests to complete with an optional timeout.

An array of object instances will be returned.

has_error

Returns true if any of the calls contain an error.

AUTHOR

Brian Gontowski <bgontowski@gmail.com>