Hmm. I think I did something odd in here...
[gitmo/MooseX-AttributeHelpers.git] / lib / MooseX / AttributeHelpers / Collection / Hash.pm
CommitLineData
22d869ff 1
2package MooseX::AttributeHelpers::Collection::Hash;
d26633fc 3use Moose;
e993b282 4use MooseX::AttributeHelpers::Sugar;
5
6extends 'MooseX::AttributeHelpers::Collection';
22d869ff 7
9a976497 8our $VERSION = '0.02';
22d869ff 9our $AUTHORITY = 'cpan:STEVAN';
10
e993b282 11define_attribute_helper (
12 helper_type => 'HashRef',
13 method_provider => 'MooseX::AttributeHelpers::MethodProvider::Hash',
14 shortcut => 'Collection::Hash',
d26633fc 15);
16
d26633fc 17no Moose;
e993b282 18no MooseX::AttributeHelpers::Sugar;
d26633fc 19
22d869ff 201;
21
22__END__
23
24=pod
25
26=head1 NAME
27
5431dff2 28MooseX::AttributeHelpers::Collection::Hash
29
22d869ff 30=head1 SYNOPSIS
31
5431dff2 32 package Stuff;
33 use Moose;
34 use MooseX::AttributeHelpers;
35
36 has 'options' => (
37 metaclass => 'Collection::Hash',
38 is => 'ro',
39 isa => 'HashRef[Str]',
40 default => sub { {} },
41 provides => {
42 'set' => 'set_option',
43 'get' => 'get_option',
44 'empty' => 'has_options',
45 'count' => 'num_options',
46 'delete' => 'delete_option',
47 }
48 );
49
22d869ff 50=head1 DESCRIPTION
51
9a976497 52This module provides an Hash attribute which provides a number of
53hash-like operations. See L<MooseX::AttributeHelpers::MethodProvider::Hash>
5431dff2 54for more details.
55
e993b282 56=head1 PROVIDED METHODS
5431dff2 57
e993b282 58The methods for this metaclass are provided by
59L<MooseX::AttributeHelpers::MethodProvider::Hash>.
5431dff2 60
22d869ff 61=head1 BUGS
62
63All complex software has bugs lurking in it, and this module is no
64exception. If you find a bug please either email me, or add the bug
65to cpan-RT.
66
67=head1 AUTHOR
68
69Stevan Little E<lt>stevan@iinteractive.comE<gt>
70
71=head1 COPYRIGHT AND LICENSE
72
99c62fb8 73Copyright 2007-2008 by Infinity Interactive, Inc.
22d869ff 74
75L<http://www.iinteractive.com>
76
77This library is free software; you can redistribute it and/or modify
78it under the same terms as Perl itself.
79
e993b282 80=cut