Why not adopt me?
This distribution is up for adoption!
If you're interested then please contact the PAUSE module admins via
email.
NAME
IRC::Indexer::Trawl::Multi - Trawl multiple IRC servers
SYNOPSIS
## Inside a POE session:
my $multi = IRC::Indexer::Trawl::Multi->new(
Servers => [
'eris.cobaltirc.org',
'raider.blackcobalt.net',
[ 'phoenix.xyloid.org', '7000' ],
{
Server => 'irc.netlandtowers.com',
Port => 7000,
UseIPV6 => 1,
. . .
},
. . .
],
## For other opts, see: perldoc IRC::Indexer::Trawl::Bot
);
$multi->run;
## Later:
if ( $multi->done ) {
my $trawled = $multi->dump;
for my $server (keys %$trawled) {
## The server information hash:
my $this_hash = $trawled->{$server};
## Get IRC::Indexer::Trawl::Bot object:
my $this_trawler = $multi->trawler($server);
## Get IRC::Indexer::Report::Server object:
my $this_info = $this_trawler->info;
## For parsing details, see:
## perldoc IRC::Indexer::Trawl::Bot
## perldoc IRC::Indexer::Report::Server
}
} else {
## Active trawlers remain.
}
DESCRIPTION
A simple manager for groups of IRC::Indexer::Trawl::Bot instances.
This is mostly an example; it is not used by any of the included controllers and is not at all sophisticated.
Given an array (reference) of server addresses, it will spawn trawlers for each server that run in parallel; when they're all finished, done() will return boolean true and dump() will return a hash reference, keyed on server name, of IRC::Indexer::Trawl::Bot netinfo() hashes.
AUTHOR
Jon Portnoy <avenj@cobaltirc.org>