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