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