Simplify the rest of the attribute helpers
[gitmo/MooseX-AttributeHelpers.git] / lib / MooseX / AttributeHelpers / Collection / Array.pm
1
2 package MooseX::AttributeHelpers::Collection::Array;
3 use Moose;
4
5 our $VERSION   = '0.01';
6 our $AUTHORITY = 'cpan:STEVAN';
7
8 extends 'Moose::Meta::Attribute';
9 with 'MooseX::AttributeHelpers::Trait::Collection::Array';
10
11 no Moose;
12
13 # register the alias ...
14 package # hide me from search.cpan.org
15     Moose::Meta::Attribute::Custom::Collection::Array;
16 sub register_implementation { 'MooseX::AttributeHelpers::Collection::Array' }
17
18
19 1;
20
21 __END__
22
23 =pod
24
25 =head1 NAME
26
27 MooseX::AttributeHelpers::Collection::Array
28
29 =head1 SYNOPSIS
30
31   package Stuff;
32   use Moose;
33   use MooseX::AttributeHelpers;
34   
35   has 'options' => (
36       metaclass => 'Collection::Array',
37       is        => 'ro',
38       isa       => 'ArrayRef[Int]',
39       default   => sub { [] },
40       provides  => {
41           'push' => 'add_options',
42           'pop'  => 'remove_last_option',
43       }
44   );
45
46 =head1 DESCRIPTION
47
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
52 =head1 METHODS
53
54 =over 4
55
56 =item B<meta>
57
58 =item B<method_provider>
59
60 =item B<has_method_provider>
61
62 =item B<helper_type>
63
64 =back
65
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
78 Copyright 2007-2008 by Infinity Interactive, Inc.
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
85 =cut