Commit | Line | Data |
457dc4fb |
1 | |
2 | package MooseX::AttributeHelpers::Collection::List; |
3 | use Moose; |
e993b282 |
4 | use MooseX::AttributeHelpers::Sugar; |
5 | |
6 | extends 'MooseX::AttributeHelpers::Collection'; |
457dc4fb |
7 | |
8 | our $VERSION = '0.01'; |
9 | our $AUTHORITY = 'cpan:STEVAN'; |
10 | |
e993b282 |
11 | define_attribute_helper ( |
12 | helper_type => 'ArrayRef', |
13 | method_provider => 'MooseX::AttributeHelpers::MethodProvider::List', |
14 | shortcut => 'Collection::List', |
457dc4fb |
15 | ); |
16 | |
457dc4fb |
17 | no Moose; |
e993b282 |
18 | no MooseX::AttributeHelpers::Sugar; |
457dc4fb |
19 | |
20 | 1; |
21 | |
22 | __END__ |
23 | |
24 | =pod |
25 | |
26 | =head1 NAME |
27 | |
28 | MooseX::AttributeHelpers::Collection::List |
29 | |
30 | =head1 SYNOPSIS |
31 | |
32 | package Stuff; |
33 | use Moose; |
34 | use MooseX::AttributeHelpers; |
35 | |
36 | has 'options' => ( |
37 | metaclass => 'Collection::List', |
38 | is => 'ro', |
39 | isa => 'ArrayRef[Int]', |
40 | default => sub { [] }, |
41 | provides => { |
42 | map => 'map_options', |
43 | grep => 'fitler_options', |
44 | } |
45 | ); |
46 | |
47 | =head1 DESCRIPTION |
48 | |
49 | This module provides an List attribute which provides a number of |
e993b282 |
50 | list operations. |
457dc4fb |
51 | |
e993b282 |
52 | =head1 PROVIDED METHODS |
457dc4fb |
53 | |
e993b282 |
54 | The methods for this metaclass are provided by |
55 | L<MooseX::AttributeHelpers::MethodProvider::List>. |
457dc4fb |
56 | |
57 | =head1 BUGS |
58 | |
59 | All complex software has bugs lurking in it, and this module is no |
60 | exception. If you find a bug please either email me, or add the bug |
61 | to cpan-RT. |
62 | |
63 | =head1 AUTHOR |
64 | |
65 | Stevan Little E<lt>stevan@iinteractive.comE<gt> |
66 | |
67 | =head1 COPYRIGHT AND LICENSE |
68 | |
99c62fb8 |
69 | Copyright 2007-2008 by Infinity Interactive, Inc. |
457dc4fb |
70 | |
71 | L<http://www.iinteractive.com> |
72 | |
73 | This library is free software; you can redistribute it and/or modify |
74 | it under the same terms as Perl itself. |
75 | |
76 | =cut |