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