Commit | Line | Data |
9a976497 |
1 | |
2 | package MooseX::AttributeHelpers::Collection::Bag; |
3 | use Moose; |
9a976497 |
4 | |
5 | our $VERSION = '0.01'; |
6 | our $AUTHORITY = 'cpan:STEVAN'; |
7 | |
090583df |
8 | extends 'Moose::Meta::Attribute'; |
9 | with 'MooseX::AttributeHelpers::Trait::Collection::Bag'; |
9a976497 |
10 | |
11 | no Moose; |
9a976497 |
12 | |
13 | # register the alias ... |
0f31cc28 |
14 | package # hide me from search.cpan.org |
15 | Moose::Meta::Attribute::Custom::Collection::Bag; |
9a976497 |
16 | sub register_implementation { 'MooseX::AttributeHelpers::Collection::Bag' } |
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 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 | |
71 | All complex software has bugs lurking in it, and this module is no |
72 | exception. If you find a bug please either email me, or add the bug |
73 | to cpan-RT. |
74 | |
75 | =head1 AUTHOR |
76 | |
77 | Stevan Little E<lt>stevan@iinteractive.comE<gt> |
78 | |
79 | =head1 COPYRIGHT AND LICENSE |
80 | |
99c62fb8 |
81 | Copyright 2007-2008 by Infinity Interactive, Inc. |
9a976497 |
82 | |
83 | L<http://www.iinteractive.com> |
84 | |
85 | This library is free software; you can redistribute it and/or modify |
86 | it under the same terms as Perl itself. |
87 | |
cf4136b4 |
88 | =cut |