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