LWP::Parallel::UserAgentLWP::Parallel::UserAgent is a Perl class for parallel User Agents. | |
Download |
LWP::Parallel::UserAgent Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Marc Langheinrich
- Publisher web site:
- http://search.cpan.org/~marclang/ParallelUserAgent-2.57/lib/LWP/Parallel/UserAgent.pm
LWP::Parallel::UserAgent Tags
LWP::Parallel::UserAgent Description
LWP::Parallel::UserAgent is a Perl class for parallel User Agents. LWP::Parallel::UserAgent is a Perl class for parallel User Agents.SYNOPSIS require LWP::Parallel::UserAgent; $ua = LWP::Parallel::UserAgent->new(); ... $ua->redirect (0); # prevents automatic following of redirects $ua->max_hosts(5); # sets maximum number of locations accessed in parallel $ua->max_req (5); # sets maximum number of parallel requests per host ... $ua->register ($request); # or $ua->register ($request, '/tmp/sss'); # or $ua->register ($request, &callback, 4096); ... $ua->wait ( $timeout ); ... sub callback { my($data, $response, $protocol) = @_; .... }This class implements a user agent that access web sources in parallel.Using a LWP::Parallel::UserAgent as your user agent, you typically start by registering your requests, along with how you want the Agent to process the incoming results (see $ua->register).Then you wait for the results by calling $ua->wait. This method only returns, if all requests have returned an answer, or the Agent timed out. Also, individual callback functions might indicate that the Agent should stop waiting for requests and return. (see $ua->register) Requirements: · Perl
LWP::Parallel::UserAgent Related Software