Composite now implemented.
[gitmo/MooseX-AttributeHelpers.git] / lib / MooseX / AttributeHelpers / Collection / Bag.pm
CommitLineData
9a976497 1package MooseX::AttributeHelpers::Collection::Bag;
2use Moose;
786dbc3d 3use MooseX::AttributeHelpers::MethodProvider::Collection::Bag;
9a976497 4
5our $VERSION = '0.01';
6our $AUTHORITY = 'cpan:STEVAN';
7
9a976497 8extends 'MooseX::AttributeHelpers::Collection';
9
786dbc3d 10__PACKAGE__->sugar(
e993b282 11 default_options => { default => sub { {} } },
786dbc3d 12 method_provider => 'Collection::Bag',
e993b282 13 shortcut => 'Collection::Bag',
14);
9a976497 15
16no Moose;
9a976497 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
e993b282 53=head1 PROVIDED METHODS
9a976497 54
e993b282 55The methods for this metaclass are provided by
56L<MooseX::AttributeHelpers::MethodProvider::Bag>.
9a976497 57
58=head1 BUGS
59
60All complex software has bugs lurking in it, and this module is no
61exception. If you find a bug please either email me, or add the bug
62to cpan-RT.
63
64=head1 AUTHOR
65
66Stevan Little E<lt>stevan@iinteractive.comE<gt>
67
68=head1 COPYRIGHT AND LICENSE
69
99c62fb8 70Copyright 2007-2008 by Infinity Interactive, Inc.
9a976497 71
72L<http://www.iinteractive.com>
73
74This library is free software; you can redistribute it and/or modify
75it under the same terms as Perl itself.
76
e993b282 77=cut