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