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