fix all examples to use handles; fix links to be to traits
[gitmo/Moose.git] / lib / Moose / AttributeHelpers / Trait / Collection / List.pm
CommitLineData
e3c07b19 1
2package Moose::AttributeHelpers::Trait::Collection::List;
3use Moose::Role;
4
dbd46676 5our $VERSION = '0.83';
e3c07b19 6$VERSION = eval $VERSION;
7our $AUTHORITY = 'cpan:STEVAN';
8
9use Moose::AttributeHelpers::MethodProvider::List;
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::List'
18);
19
20sub helper_type { 'ArrayRef' }
21
22no Moose::Role;
23
24# register the alias ...
25package # hide me from search.cpan.org
26 Moose::Meta::Attribute::Custom::Trait::Collection::List;
27sub register_implementation {
28 'Moose::AttributeHelpers::Trait::Collection::List'
29}
30
31
321;
33
34__END__
35
36=pod
37
38=head1 NAME
39
40Moose::AttributeHelpers::Collection::List
41
42=head1 SYNOPSIS
43
44 package Stuff;
45 use Moose;
46 use Moose::AttributeHelpers;
47
48 has 'options' => (
49 metaclass => 'Collection::List',
50 is => 'ro',
51 isa => 'ArrayRef[Int]',
52 default => sub { [] },
5f3663b2 53 handles => {
54 map_options => 'map',
55 filter_options => 'grep',
e3c07b19 56 }
57 );
58
59=head1 DESCRIPTION
60
61This module provides an List attribute which provides a number of
62list operations. See L<Moose::AttributeHelpers::MethodProvider::List>
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
75=item B<helper_type>
76
77=back
78
79=head1 BUGS
80
81All complex software has bugs lurking in it, and this module is no
82exception. If you find a bug please either email me, or add the bug
83to cpan-RT.
84
85=head1 AUTHOR
86
87Stevan Little E<lt>stevan@iinteractive.comE<gt>
88
89=head1 COPYRIGHT AND LICENSE
90
91Copyright 2007-2009 by Infinity Interactive, Inc.
92
93L<http://www.iinteractive.com>
94
95This library is free software; you can redistribute it and/or modify
96it under the same terms as Perl itself.
97
98=cut