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