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