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