0.01
[gitmo/MooseX-AttributeHelpers.git] / lib / MooseX / AttributeHelpers / Collection / Hash.pm
CommitLineData
22d869ff 1
2package MooseX::AttributeHelpers::Collection::Hash;
d26633fc 3use Moose;
22d869ff 4
5our $VERSION = '0.01';
6our $AUTHORITY = 'cpan:STEVAN';
7
65a43f48 8use MooseX::AttributeHelpers::MethodProvider::Hash;
d26633fc 9
65a43f48 10extends 'MooseX::AttributeHelpers::Collection';
8ba40fb0 11
65a43f48 12has '+method_provider' => (
13 default => 'MooseX::AttributeHelpers::MethodProvider::Hash'
d26633fc 14);
15
65a43f48 16sub helper_type { 'HashRef' }
17
d26633fc 18no Moose;
19
20# register the alias ...
21package Moose::Meta::Attribute::Custom::Collection::Hash;
22sub register_implementation { 'MooseX::AttributeHelpers::Collection::Hash' }
23
24
22d869ff 251;
26
27__END__
28
29=pod
30
31=head1 NAME
32
5431dff2 33MooseX::AttributeHelpers::Collection::Hash
34
22d869ff 35=head1 SYNOPSIS
36
5431dff2 37 package Stuff;
38 use Moose;
39 use MooseX::AttributeHelpers;
40
41 has 'options' => (
42 metaclass => 'Collection::Hash',
43 is => 'ro',
44 isa => 'HashRef[Str]',
45 default => sub { {} },
46 provides => {
47 'set' => 'set_option',
48 'get' => 'get_option',
49 'empty' => 'has_options',
50 'count' => 'num_options',
51 'delete' => 'delete_option',
52 }
53 );
54
22d869ff 55=head1 DESCRIPTION
56
5431dff2 57This module provides an Array attribute which provides a number of
58array operations. See L<MooseX::AttributeHelpers::MethodProvider::Hash>
59for more details.
60
22d869ff 61=head1 METHODS
62
5431dff2 63=over 4
64
65=item B<meta>
66
67=item B<method_provider>
68
69=item B<has_method_provider>
70
71=item B<helper_type>
72
73=back
74
22d869ff 75=head1 BUGS
76
77All complex software has bugs lurking in it, and this module is no
78exception. If you find a bug please either email me, or add the bug
79to cpan-RT.
80
81=head1 AUTHOR
82
83Stevan Little E<lt>stevan@iinteractive.comE<gt>
84
85=head1 COPYRIGHT AND LICENSE
86
87Copyright 2007 by Infinity Interactive, Inc.
88
89L<http://www.iinteractive.com>
90
91This library is free software; you can redistribute it and/or modify
92it under the same terms as Perl itself.
93
94=cut