2 package MooseX::AttributeHelpers::Collection::Hash;
6 our $AUTHORITY = 'cpan:STEVAN';
8 extends 'MooseX::AttributeHelpers::Base';
10 sub helper_type { 'HashRef' }
12 has '+method_constructors' => (
17 return sub { $attr->get_value($_[0])->{$_[1]} };
21 return sub { $attr->get_value($_[0])->{$_[1]} = $_[2] };
25 return sub { scalar keys %{$attr->get_value($_[0])} };
29 return sub { scalar keys %{$attr->get_value($_[0])} ? 1 : 0 };
37 # register the alias ...
38 package Moose::Meta::Attribute::Custom::Collection::Hash;
39 sub register_implementation { 'MooseX::AttributeHelpers::Collection::Hash' }
58 All complex software has bugs lurking in it, and this module is no
59 exception. If you find a bug please either email me, or add the bug
64 Stevan Little E<lt>stevan@iinteractive.comE<gt>
66 =head1 COPYRIGHT AND LICENSE
68 Copyright 2007 by Infinity Interactive, Inc.
70 L<http://www.iinteractive.com>
72 This library is free software; you can redistribute it and/or modify
73 it under the same terms as Perl itself.