
MouseX::AttributeHelpers::Collection::Array

package MyClass;
use Mouse;
use MouseX::AttributeHelpers;
has 'options' => (
metaclass => 'Collection::Array',
is => 'rw',
isa => 'ArrayRef',
default => sub { [] },
provides => {
count => 'num_options',
empty => 'has_options',
push => 'add_options',
pop => 'remove_last_option',
},
);

This module provides an Array attribute which provides a number of array operations.

This module also consumes the List method providers. See also MouseX::AttributeHelpers::Collection::List.


NAKAGAWA Masaki <masaki@cpan.org>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

MouseX::AttributeHelpers, MouseX::AttributeHelpers::Base, MouseX::AttributeHelpers::Collection::List