Jon Portnoy > Bot-Cobalt-0.016000 > Bot::Cobalt::Plugin::RDB::AsyncSearch

Download:
Bot-Cobalt-0.016000.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.016000   Source   Latest Release: Bot-Cobalt-0.016002

NAME ^

Bot::Cobalt::Plugin::RDB::AsyncSearch - Asynchronous RDB deep search

SYNOPSIS ^

  ## Inside a POE::Session
  my $async_sessID = Bot::Cobalt::Plugin::RDB::AsyncSearch->spawn(
    MaxWorkers => 5,
    ResultEvent => 'got_rdb_result',
    ErrorEvent  => 'got_rdb_error',
  );

  $poe_kernel->post( $async_sessID,
    'search_rdb',
    $rdb_path,
    $regex,
    $hints_hash
  );

DESCRIPTION ^

This is a simple POE session for managing fork()/exec()'d Bot::Cobalt::Plugin::RDB::AsyncSearch::Worker instances via POE::Wheel::Run.

It does not interact with the Bot::Cobalt core directly in any way; it can be used from any POE session to deep-search RDBs.

Searches should be posted to the search_rdb event (see "SYNOPSIS").

Results are returned to the specified ResultEvent; the first argument is an array reference of results, the second argument is the $hints_hash originally passed in via search_rdb.

AUTHOR ^

Jon Portnoy <avenj@cobaltirc.org>

http://www.cobaltirc.org

syntax highlighting: