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