0.01
[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.01';
6 our $AUTHORITY = 'cpan:STEVAN';
7
8 use MooseX::AttributeHelpers::MethodProvider::Hash;
9
10 extends 'MooseX::AttributeHelpers::Collection';
11
12 has '+method_provider' => (
13     default => 'MooseX::AttributeHelpers::MethodProvider::Hash'
14 );
15
16 sub helper_type { 'HashRef' }
17
18 no Moose;
19
20 # register the alias ...
21 package Moose::Meta::Attribute::Custom::Collection::Hash;
22 sub register_implementation { 'MooseX::AttributeHelpers::Collection::Hash' }
23
24
25 1;
26
27 __END__
28
29 =pod
30
31 =head1 NAME
32
33 MooseX::AttributeHelpers::Collection::Hash
34
35 =head1 SYNOPSIS
36
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   
55 =head1 DESCRIPTION
56
57 This module provides an Array attribute which provides a number of 
58 array operations. See L<MooseX::AttributeHelpers::MethodProvider::Hash>
59 for more details.
60
61 =head1 METHODS
62
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
75 =head1 BUGS
76
77 All complex software has bugs lurking in it, and this module is no 
78 exception. If you find a bug please either email me, or add the bug
79 to cpan-RT.
80
81 =head1 AUTHOR
82
83 Stevan Little E<lt>stevan@iinteractive.comE<gt>
84
85 =head1 COPYRIGHT AND LICENSE
86
87 Copyright 2007 by Infinity Interactive, Inc.
88
89 L<http://www.iinteractive.com>
90
91 This library is free software; you can redistribute it and/or modify
92 it under the same terms as Perl itself.
93
94 =cut