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