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