Tom Molesworth > EntityModel-0.017 > EntityModel::Gather

Download:
EntityModel-0.017.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.017   Source  

NAME ^

EntityModel::Gather - asynchronous helper functions for EntityModel

VERSION ^

version 0.017

SYNOPSIS ^

 use EntityModel::Gather;

DESCRIPTION ^

Wrapper class for executing code once data values have been populated.

Given a set of data key => value pairs, this module will request population from each provider. Once all data values are available, the on_ready event is triggered, and the data values are passed to the provided handler. If it is impossible to retrieve data values for some reason, the on_error handler is called instead.

Each of the values passed must be one of the following:

Any other value will cause the scalar handling to be used.

METHODS ^

new

Create a new instance. Takes a list of key, value pairs indicating which data values to wait for.

add_pending

Adds the given key and value to the pending list. If the value is immediately available (simple scalar, for example) then this will pass the value through immediately.

AUTHOR ^

Tom Molesworth <cpan@entitymodel.com>

LICENSE ^

Copyright Tom Molesworth 2008-2011. Licensed under the same terms as Perl itself.

syntax highlighting: