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