File Coverage

blib/lib/MooseX/AttributeHelpers/Collection/Bag.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 10 10 100.0


line stmt bran cond sub pod time code
1             package MooseX::AttributeHelpers::Collection::Bag;
2 22     22   91 use Moose;
  22         28  
  22         140  
3              
4             our $VERSION = '0.25';
5              
6             extends 'Moose::Meta::Attribute';
7             with 'MooseX::AttributeHelpers::Trait::Collection::Bag';
8              
9 22     22   99850 no Moose;
  22         31  
  22         91  
10              
11             # register the alias ...
12             package # hide me from search.cpan.org
13             Moose::Meta::Attribute::Custom::Collection::Bag;
14 1     1   609 sub register_implementation { 'MooseX::AttributeHelpers::Collection::Bag' }
15              
16             1;
17              
18             __END__
19              
20             =pod
21              
22             =encoding UTF-8
23              
24             =head1 NAME
25              
26             MooseX::AttributeHelpers::Collection::Bag
27              
28             =head1 VERSION
29              
30             version 0.25
31              
32             =head1 SYNOPSIS
33              
34             package Stuff;
35             use Moose;
36             use MooseX::AttributeHelpers;
37            
38             has 'word_histogram' => (
39             metaclass => 'Collection::Bag',
40             is => 'ro',
41             isa => 'Bag', # optional ... as is default
42             provides => {
43             'add' => 'add_word',
44             'get' => 'get_count_for',
45             'empty' => 'has_any_words',
46             'count' => 'num_words',
47             'delete' => 'delete_word',
48             }
49             );
50              
51             =head1 DESCRIPTION
52              
53             This module provides a Bag attribute which provides a number of
54             bag-like operations. See L<MooseX::AttributeHelpers::MethodProvider::Bag>
55             for more details.
56              
57             =head1 METHODS
58              
59             =over 4
60              
61             =item B<meta>
62              
63             =item B<method_provider>
64              
65             =item B<has_method_provider>
66              
67             =item B<helper_type>
68              
69             =item B<process_options_for_provides>
70              
71             =back
72              
73             =head1 SUPPORT
74              
75             Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-AttributeHelpers>
76             (or L<bug-MooseX-AttributeHelpers@rt.cpan.org|mailto:bug-MooseX-AttributeHelpers@rt.cpan.org>).
77              
78             There is also a mailing list available for users of this distribution, at
79             L<http://lists.perl.org/list/moose.html>.
80              
81             There is also an irc channel available for users of this distribution, at
82             L<C<#moose> on C<irc.perl.org>|irc://irc.perl.org/#moose>.
83              
84             =head1 AUTHOR
85              
86             Stevan Little <stevan@iinteractive.com>
87              
88             =head1 COPYRIGHT AND LICENSE
89              
90             This software is copyright (c) 2007 by Stevan Little and Infinity Interactive, Inc.
91              
92             This is free software; you can redistribute it and/or modify it under
93             the same terms as the Perl 5 programming language system itself.
94              
95             =cut