| MouseX-AttributeHelpers documentation | view source | Contained in the MouseX-AttributeHelpers distribution. |
MouseX::AttributeHelpers::Collection::List
package MyClass;
use Mouse;
use MouseX::AttributeHelpers;
has 'options' => (
metaclass => 'Collection::List',
is => 'rw',
isa => 'ArrayRef',
default => sub { [] },
provides => {
count => 'num_options',
empty => 'has_options',
map => 'map_options',
grep => 'filter_options',
elements => 'all_options',
},
);
This module provides an List attribute which provides a number of list operations.
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 documentation | view source | Contained in the MouseX-AttributeHelpers distribution. |