line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooseX::AttributeHelpers::Collection::ImmutableHash; |
2
|
22
|
|
|
22
|
|
100
|
use Moose; |
|
22
|
|
|
|
|
36
|
|
|
22
|
|
|
|
|
168
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.25'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
extends 'Moose::Meta::Attribute'; |
7
|
|
|
|
|
|
|
with 'MooseX::AttributeHelpers::Trait::Collection::ImmutableHash'; |
8
|
|
|
|
|
|
|
|
9
|
22
|
|
|
22
|
|
107451
|
no Moose; |
|
22
|
|
|
|
|
33
|
|
|
22
|
|
|
|
|
1390
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# register the alias ... |
12
|
|
|
|
|
|
|
package # hide me from search.cpan.org |
13
|
|
|
|
|
|
|
Moose::Meta::Attribute::Custom::Collection::ImmutableHash; |
14
|
0
|
|
|
0
|
|
|
sub register_implementation { 'MooseX::AttributeHelpers::Collection::ImmutableHash' } |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
1; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__END__ |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=pod |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=encoding UTF-8 |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
MooseX::AttributeHelpers::Collection::ImmutableHash |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 VERSION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
version 0.25 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
package Stuff; |
36
|
|
|
|
|
|
|
use Moose; |
37
|
|
|
|
|
|
|
use MooseX::AttributeHelpers; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
has 'options' => ( |
40
|
|
|
|
|
|
|
metaclass => 'Collection::ImmutableHash', |
41
|
|
|
|
|
|
|
is => 'ro', |
42
|
|
|
|
|
|
|
isa => 'HashRef[Str]', |
43
|
|
|
|
|
|
|
default => sub { {} }, |
44
|
|
|
|
|
|
|
provides => { |
45
|
|
|
|
|
|
|
'get' => 'get_option', |
46
|
|
|
|
|
|
|
'empty' => 'has_options', |
47
|
|
|
|
|
|
|
'keys' => 'get_option_list', |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 DESCRIPTION |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This module provides a immutable HashRef attribute which provides a number of |
54
|
|
|
|
|
|
|
hash-line operations. See L<MooseX::AttributeHelpers::MethodProvider::ImmutableHash> |
55
|
|
|
|
|
|
|
for more details. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 METHODS |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=over 4 |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=item B<meta> |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=item B<method_provider> |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item B<has_method_provider> |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=item B<helper_type> |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=back |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 SUPPORT |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-AttributeHelpers> |
74
|
|
|
|
|
|
|
(or L<bug-MooseX-AttributeHelpers@rt.cpan.org|mailto:bug-MooseX-AttributeHelpers@rt.cpan.org>). |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
There is also a mailing list available for users of this distribution, at |
77
|
|
|
|
|
|
|
L<http://lists.perl.org/list/moose.html>. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
There is also an irc channel available for users of this distribution, at |
80
|
|
|
|
|
|
|
L<C<#moose> on C<irc.perl.org>|irc://irc.perl.org/#moose>. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 AUTHOR |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Stevan Little <stevan@iinteractive.com> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
This software is copyright (c) 2007 by Stevan Little and Infinity Interactive, Inc. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
91
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=cut |