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