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