1 package MooseX::AttributeHelpers::MethodProvider::Bag;
4 our $VERSION = '0.12_01';
5 $VERSION = eval $VERSION;
6 our $AUTHORITY = 'cpan:STEVAN';
8 with 'MooseX::AttributeHelpers::MethodProvider::ImmutableHash';
11 my ($attr, $reader, $writer) = @_;
12 return sub { $reader->($_[0])->{$_[1]}++ };
16 my ($attr, $reader, $writer) = @_;
17 return sub { CORE::delete $reader->($_[0])->{$_[1]} };
21 my ($attr, $reader, $writer) = @_;
22 return sub { $reader->($_[0])->{$_[1]} = 0 };
33 MooseX::AttributeHelpers::MethodProvider::Bag
37 This is a role which provides the method generators for
38 L<MooseX::AttributeHelpers::Collection::Bag>.
40 This role is composed from the
41 L<MooseX::AttributeHelpers::Collection::ImmutableHash> role.
51 =head1 PROVIDED METHODS
79 All complex software has bugs lurking in it, and this module is no
80 exception. If you find a bug please either email me, or add the bug
85 Stevan Little E<lt>stevan@iinteractive.comE<gt>
87 =head1 COPYRIGHT AND LICENSE
89 Copyright 2007-2008 by Infinity Interactive, Inc.
91 L<http://www.iinteractive.com>
93 This library is free software; you can redistribute it and/or modify
94 it under the same terms as Perl itself.