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