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