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