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