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