foo
[gitmo/MooseX-AttributeHelpers.git] / lib / MooseX / AttributeHelpers / Collection / Array.pm
1
2 package MooseX::AttributeHelpers::Collection::Array;
3 use Moose;
4 use Moose::Util::TypeConstraints;
5
6 our $VERSION   = '0.01';
7 our $AUTHORITY = 'cpan:STEVAN';
8
9 use MooseX::AttributeHelpers::MethodProvider::Array;
10
11 extends 'MooseX::AttributeHelpers::Collection';
12
13 has '+method_provider' => (
14     default => 'MooseX::AttributeHelpers::MethodProvider::Array'
15 );
16
17 sub helper_type { 'ArrayRef' }
18
19 no Moose;
20
21 # register the alias ...
22 package Moose::Meta::Attribute::Custom::Collection::Array;
23 sub register_implementation { 'MooseX::AttributeHelpers::Collection::Array' }
24
25
26 1;
27
28 __END__
29
30 =pod
31
32 =head1 NAME
33
34 =head1 SYNOPSIS
35
36   package Stuff;
37   use Moose;
38   
39   has 'options' => (
40       metaclass => 'Collection',
41       is        => 'ro',
42       isa       => 'ArrayRef[Int]',
43       default   => sub { [] },
44       provides  => {
45           'push' => 'add_options',
46           'pop'  => 'remove_last_option',
47       }
48   );
49
50 =head1 DESCRIPTION
51
52 =head1 METHODS
53
54 =head1 BUGS
55
56 All complex software has bugs lurking in it, and this module is no 
57 exception. If you find a bug please either email me, or add the bug
58 to cpan-RT.
59
60 =head1 AUTHOR
61
62 Stevan Little E<lt>stevan@iinteractive.comE<gt>
63
64 =head1 COPYRIGHT AND LICENSE
65
66 Copyright 2007 by Infinity Interactive, Inc.
67
68 L<http://www.iinteractive.com>
69
70 This library is free software; you can redistribute it and/or modify
71 it under the same terms as Perl itself.
72
73 =cut