line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::MultiValued::TagContainerForRanges; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Data::MultiValued::TagContainerForRanges::VERSION = '0.0.1_4'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
{ |
6
|
|
|
|
|
|
|
$Data::MultiValued::TagContainerForRanges::DIST = 'Data-MultiValued'; |
7
|
|
|
|
|
|
|
} |
8
|
7
|
|
|
7
|
|
42
|
use Moose; |
|
7
|
|
|
|
|
18
|
|
|
7
|
|
|
|
|
76
|
|
9
|
7
|
|
|
7
|
|
76629
|
use namespace::autoclean; |
|
7
|
|
|
|
|
21
|
|
|
7
|
|
|
|
|
84
|
|
10
|
7
|
|
|
7
|
|
726
|
use MooseX::Types::Moose qw(HashRef); |
|
7
|
|
|
|
|
18
|
|
|
7
|
|
|
|
|
116
|
|
11
|
7
|
|
|
7
|
|
43931
|
use Moose::Util::TypeConstraints; |
|
7
|
|
|
|
|
21
|
|
|
7
|
|
|
|
|
95
|
|
12
|
7
|
|
|
7
|
|
20708
|
use Data::MultiValued::RangeContainer; |
|
7
|
|
|
|
|
18
|
|
|
7
|
|
|
|
|
2743
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# ABSTRACT: container for tagged values that are ranged containers |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
extends 'Data::MultiValued::TagContainer'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
has '+_storage' => ( |
20
|
|
|
|
|
|
|
isa => HashRef[class_type('Data::MultiValued::RangeContainer')], |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has '+_default_tag' => ( |
24
|
|
|
|
|
|
|
isa => class_type('Data::MultiValued::RangeContainer'), |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub _create_new_inferior { |
29
|
11
|
|
|
11
|
|
567
|
Data::MultiValued::RangeContainer->new(); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _rebless_storage { |
34
|
1
|
|
|
1
|
|
4
|
my ($self) = @_; |
35
|
1
|
|
|
|
|
89
|
bless $_,'Data::MultiValued::RangeContainer' |
36
|
1
|
|
|
|
|
3
|
for values %{$self->{_storage}}; |
37
|
1
|
|
|
|
|
5
|
bless $self->{_default_tag},'Data::MultiValued::RangeContainer'; |
38
|
1
|
|
|
|
|
7
|
return; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub _as_hash { |
43
|
1
|
|
|
1
|
|
4
|
my ($self) = @_; |
44
|
1
|
|
|
|
|
3
|
my %st; |
45
|
1
|
|
|
|
|
2
|
for my $k (keys %{$self->_storage}) { |
|
1
|
|
|
|
|
51
|
|
46
|
1
|
|
|
|
|
3
|
my %v = %{$self->_storage->{$k}}; |
|
1
|
|
|
|
|
45
|
|
47
|
1
|
|
|
|
|
13
|
$st{$k}=\%v; |
48
|
|
|
|
|
|
|
} |
49
|
1
|
|
|
|
|
3
|
my %dt = %{$self->_default_tag}; |
|
1
|
|
|
|
|
52
|
|
50
|
|
|
|
|
|
|
return { |
51
|
1
|
|
|
|
|
8
|
_storage => \%st, |
52
|
|
|
|
|
|
|
_default_tag => \%dt, |
53
|
|
|
|
|
|
|
}; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
__END__ |
61
|
|
|
|
|
|
|
=pod |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=encoding utf-8 |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 NAME |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Data::MultiValued::TagContainerForRanges - container for tagged values that are ranged containers |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 VERSION |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
version 0.0.1_4 |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 DESCRIPTION |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Please don't use this module directly, use |
76
|
|
|
|
|
|
|
L<Data::MultiValued::TagsAndRanges>. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This module is a subclass of L<Data::MultiValued::TagContainer>, which |
79
|
|
|
|
|
|
|
only allows instances of L<Data::MultiValued::RangeContainer> as |
80
|
|
|
|
|
|
|
"storage cells". |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 METHODS |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 C<_create_new_inferior> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Returns a new L<Data::MultiValued::RangeContainer> instance. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 Serialisation helpers |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
These are used through |
91
|
|
|
|
|
|
|
L<Data::MultiValued::UglySerializationHelperRole>. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head2 C<_rebless_storage> |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Blesses the "storage cells" into L<Data::MultiValued::RangeContainer>. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head2 C<_as_hash> |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Returns the internal representation with no blessed hashes, with as |
100
|
|
|
|
|
|
|
few copies as possible. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 AUTHOR |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Gianni Ceccarelli <dakkar@thenautilus.net> |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
This software is copyright (c) 2011 by Net-a-Porter.com. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
111
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=cut |
114
|
|
|
|
|
|
|
|