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