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