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