View on
MetaCPAN
Tom Molesworth > Adapter-Async-0.019 > Adapter::Async::OrderedList

Download:
Adapter-Async-0.019.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.019   Source  

NAME ^

Adapter::Async::OrderedList - API for dealing with ordered lists

VERSION ^

version 0.018

DESCRIPTION ^

Accessing data

This means we have double-notify on get: a request for (1,2,3,4) needs to fire events for each of 1,2,3,4, and also return the list of all of them on completion (by resolving a Future).

Modification

Helper methods provide the following:

Events

All events are shared over a common bus for each data source, in the usual fashion - adapters and views can subscribe to the ones they're interested in, and publish events at any time.

The adapter raises these:

The view raises these:

METHODS ^

insert

Inserts data before the given position.

 $adapter->insert(3, [...])

append

Appends data after the given position.

 $adapter->append(3, [...])

push

Appends data to the end of the list.

unshift

Inserts data at the start of the list.

pop

Removes the last element from the list, will resolve with the value.

shift

Removes the first element from the list, will resolve with the value.

all

Returns all the items. Shortcut for calling "count" then "get".

INHERITED METHODS ^

Adapter::Async

bus, new

AUTHOR ^

Tom Molesworth <TEAM@cpan.org>

LICENSE ^

Copyright Tom Molesworth 2013-2015. Licensed under the same terms as Perl itself.

syntax highlighting: