Docs tentatively finished.
[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. 
51
52 =head1 PROVIDED METHODS
53
54 The methods for this metaclass are provided by
55 L<MooseX::AttributeHelpers::MethodProvider::Collection::Hash>.
56
57 =head1 BUGS
58
59 All complex software has bugs lurking in it, and this module is no 
60 exception. If you find a bug please either email me, or add the bug
61 to cpan-RT.
62
63 =head1 AUTHOR
64
65 Stevan Little E<lt>stevan@iinteractive.comE<gt>
66
67 =head1 COPYRIGHT AND LICENSE
68
69 Copyright 2007-2008 by Infinity Interactive, Inc.
70
71 L<http://www.iinteractive.com>
72
73 This library is free software; you can redistribute it and/or modify
74 it under the same terms as Perl itself.
75
76 =cut