Simplify the rest of the attribute helpers
[gitmo/MooseX-AttributeHelpers.git] / lib / MooseX / AttributeHelpers / Collection / Bag.pm
CommitLineData
9a976497 1
2package MooseX::AttributeHelpers::Collection::Bag;
3use Moose;
9a976497 4
5our $VERSION = '0.01';
6our $AUTHORITY = 'cpan:STEVAN';
7
090583df 8extends 'Moose::Meta::Attribute';
9with 'MooseX::AttributeHelpers::Trait::Collection::Bag';
9a976497 10
11no Moose;
9a976497 12
13# register the alias ...
0f31cc28 14package # hide me from search.cpan.org
15 Moose::Meta::Attribute::Custom::Collection::Bag;
9a976497 16sub register_implementation { 'MooseX::AttributeHelpers::Collection::Bag' }
17
181;
19
20__END__
21
22=pod
23
24=head1 NAME
25
26MooseX::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
49This module provides a Bag attribute which provides a number of
50bag-like operations. See L<MooseX::AttributeHelpers::MethodProvider::Bag>
51for more details.
52
53=head1 METHODS
54
55=over 4
56
57=item B<meta>
58
59=item B<method_provider>
60
61=item B<has_method_provider>
62
63=item B<helper_type>
64
65=item B<process_options_for_provides>
66
67=back
68
69=head1 BUGS
70
71All complex software has bugs lurking in it, and this module is no
72exception. If you find a bug please either email me, or add the bug
73to cpan-RT.
74
75=head1 AUTHOR
76
77Stevan Little E<lt>stevan@iinteractive.comE<gt>
78
79=head1 COPYRIGHT AND LICENSE
80
99c62fb8 81Copyright 2007-2008 by Infinity Interactive, Inc.
9a976497 82
83L<http://www.iinteractive.com>
84
85This library is free software; you can redistribute it and/or modify
86it under the same terms as Perl itself.
87
cf4136b4 88=cut