EntityModel::Array - wrapper object for dealing with arrayrefs
Version 0.016
Primarily intended as an abstract interface for use with EntityModel backend storage.
Instantiates with the given arrayref
Returns the number of items in the arrayref if called without parameters. This is the recommended usage.
If passed a coderef, will call that coderef with the count, and return $self instead.
Returns all items from the arrayref.
Push the requested value onto the end of the arrayref.
Support for the "splice" in perlfunc operation.
Takes an offset, length and zero or more items, splices those into the array, invokes the splice event, then returns $self.
splice
Add a coderef to be called when the array changes.
Removes a watch from this array.
Returns $self.
Shift the first value out of the arrayref.
Pops the last value from the arrayref.
Unshifts a value onto the start of the arrayref.
Joins the entries in the arrayref using the given value and returns as a scalar.
Perform coderef on each entry in the arrayref.
Returns the first entry in the arrayref.
Returns the last entry in the arrayref.
Calls the coderef on each entry in the arrayref and returns the entries for which it returns true.
Remove entries from the array.
Avoid rebuilding the array in case we have weak refs, just splice out the values indicated.
Empty the arrayref.
Returns the arrayref directly.
Returns true if there's nothing in the arrayref.
Use autobox instead.
add_handler_for_event, clear_event_handlers, event_handlers, invoke_event, subscribe_to_event, unsubscribe_from_event
Tom Molesworth <cpan@entitymodel.com>
Copyright Tom Molesworth 2008-2014. Licensed under the same terms as Perl itself.
To install EntityModel::Class, copy and paste the appropriate command in to your terminal.
cpanm
cpanm EntityModel::Class
CPAN shell
perl -MCPAN -e shell install EntityModel::Class
For more information on module installation, please visit the detailed CPAN module installation guide.