Commit | Line | Data |
457dc4fb |
1 | |
2 | package MooseX::AttributeHelpers::Collection::List; |
3 | use Moose; |
4 | |
227feec8 |
5 | our $VERSION = '0.16'; |
38430345 |
6 | $VERSION = eval $VERSION; |
457dc4fb |
7 | our $AUTHORITY = 'cpan:STEVAN'; |
8 | |
9 | use MooseX::AttributeHelpers::MethodProvider::List; |
10 | |
11 | extends 'MooseX::AttributeHelpers::Collection'; |
12 | |
13 | has '+method_provider' => ( |
14 | default => 'MooseX::AttributeHelpers::MethodProvider::List' |
15 | ); |
16 | |
17 | sub helper_type { 'ArrayRef' } |
18 | |
19 | no Moose; |
20 | |
21 | # register the alias ... |
0f31cc28 |
22 | package # hide me from search.cpan.org |
23 | Moose::Meta::Attribute::Custom::Collection::List; |
457dc4fb |
24 | sub register_implementation { 'MooseX::AttributeHelpers::Collection::List' } |
25 | |
26 | |
27 | 1; |
28 | |
29 | __END__ |
30 | |
31 | =pod |
32 | |
33 | =head1 NAME |
34 | |
35 | MooseX::AttributeHelpers::Collection::List |
36 | |
37 | =head1 SYNOPSIS |
38 | |
39 | package Stuff; |
40 | use Moose; |
41 | use MooseX::AttributeHelpers; |
42 | |
43 | has 'options' => ( |
44 | metaclass => 'Collection::List', |
45 | is => 'ro', |
46 | isa => 'ArrayRef[Int]', |
47 | default => sub { [] }, |
48 | provides => { |
49 | map => 'map_options', |
15af9cef |
50 | grep => 'filter_options', |
457dc4fb |
51 | } |
52 | ); |
53 | |
54 | =head1 DESCRIPTION |
55 | |
56 | This module provides an List attribute which provides a number of |
57 | list operations. See L<MooseX::AttributeHelpers::MethodProvider::List> |
58 | for more details. |
59 | |
60 | =head1 METHODS |
61 | |
62 | =over 4 |
63 | |
b91f57af |
64 | =item B<meta> |
65 | |
457dc4fb |
66 | =item B<method_provider> |
67 | |
68 | =item B<has_method_provider> |
69 | |
70 | =item B<helper_type> |
71 | |
72 | =back |
73 | |
74 | =head1 BUGS |
75 | |
76 | All complex software has bugs lurking in it, and this module is no |
77 | exception. If you find a bug please either email me, or add the bug |
78 | to cpan-RT. |
79 | |
80 | =head1 AUTHOR |
81 | |
82 | Stevan Little E<lt>stevan@iinteractive.comE<gt> |
83 | |
84 | =head1 COPYRIGHT AND LICENSE |
85 | |
99c62fb8 |
86 | Copyright 2007-2008 by Infinity Interactive, Inc. |
457dc4fb |
87 | |
88 | L<http://www.iinteractive.com> |
89 | |
90 | This library is free software; you can redistribute it and/or modify |
91 | it under the same terms as Perl itself. |
92 | |
93 | =cut |