NAME
EntityModel::Array - wrapper object for dealing with arrayrefs
VERSION
version 0.011
SYNOPSIS
See EntityModel::Class.
DESCRIPTION
Primarily intended as an abstract interface for use with EntityModel backend storage.
METHODS
new
Instantiates with the given arrayref
count
Returns the number of items in the arrayref.
list
Returns all items from the arrayref.
push
Push the requested value onto the end of the arrayref.
watch
Add a coderef to be called when the array changes.
shift
Shift the first value out of the arrayref.
pop
Pops the last value from the arrayref.
unshift
Unshifts a value onto the start of the arrayref.
join
Joins the entries in the arrayref using the given value and returns as a scalar.
each
Perform coderef on each entry in the arrayref.
first
Returns the first entry in the arrayref.
last
Returns the last entry in the arrayref.
grep
Calls the coderef on each entry in the arrayref and returns the entries for which it returns true.
remove
Remove entries from the array.
Avoid rebuilding the array in case we have weak refs, just splice out the values indicated.
clear
Empty the arrayref.
arrayref
Returns the arrayref directly.
is_empty
Returns true if there's nothing in the arrayref.
SEE ALSO
Use autobox instead.
AUTHOR
Tom Molesworth <cpan@entitymodel.com>
LICENSE
Copyright Tom Molesworth 2008-2011. Licensed under the same terms as Perl itself.