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