NAME
Data::Perl::Collection::Array::AutoFlatten - Like Collection::Array, but flattened.
VERSION
version 0.001005
SYNOPSIS
use aliased 'Data::Perl::Collection::Array::AutoFlatten';
my $array = Array->new(1, 2, 3);
$array->push(5);
$array->grep(sub { $_ > 2 })->map(sub { $_ ** 2 }); # fails
DESCRIPTION
This class wraps Data::Perl::Collection::Array to ensure all methods that could otherwise return a Collection::Hash or Collection::Array object will instead return a real perl hash or array. As a result, chaining methods is impossible.
WRAPPED METHODS
map($cb)
Instead of returning a Data::Perl::Collection::Array object, a real array is returned.
grep($cb)
Instead of returning a Data::Perl::Collection::Array object, a real array is returned.
reverse
Instead of returning a Data::Perl::Collection::Array object, a real array is returned.
sort($sort_cb))
Instead of returning a Data::Perl::Collection::Array object, a real array is returned.
sort_in_place($sort_cb)
Instead of returning a Data::Perl::Collection::Array object, a real array is returned.
splice($offset, $length, @values)
In list context, instead of returning a Data::Perl::Collection::Array object, a real array is returned.
shuffle
Instead of returning a Data::Perl::Collection::Array object, a real array is returned.
uniq
Instead of returning a Data::Perl::Collection::Array object, a real array is returned.
SEE ALSO
AUTHOR
Matthew Phillips <mattp@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Matthew Phillips <mattp@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.