line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::MultiValued::AttributeTrait::Ranges; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$Data::MultiValued::AttributeTrait::Ranges::VERSION = '0.0.1_4'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
{ |
6
|
|
|
|
|
|
|
$Data::MultiValued::AttributeTrait::Ranges::DIST = 'Data-MultiValued'; |
7
|
|
|
|
|
|
|
} |
8
|
2
|
|
|
2
|
|
552324
|
use Moose::Role; |
|
2
|
|
|
|
|
5044
|
|
|
2
|
|
|
|
|
21
|
|
9
|
2
|
|
|
2
|
|
13353
|
use namespace::autoclean; |
|
2
|
|
|
|
|
1747
|
|
|
2
|
|
|
|
|
17
|
|
10
|
2
|
|
|
2
|
|
1585
|
use Data::MultiValued::Ranges; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
477
|
|
11
|
|
|
|
|
|
|
with 'Data::MultiValued::AttributeTrait'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# ABSTRACT: attribute traits for attributes holding ranged values |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
8
|
|
|
8
|
1
|
308
|
sub multivalue_storage_class { 'Data::MultiValued::Ranges' }; |
17
|
7
|
|
|
7
|
1
|
41
|
sub opts_to_pass_set { qw(from to) } |
18
|
18
|
|
|
18
|
1
|
73
|
sub opts_to_pass_get { qw(at) } |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
package Moose::Meta::Attribute::Custom::Trait::MultiValued::Ranges; |
21
|
|
|
|
|
|
|
{ |
22
|
|
|
|
|
|
|
$Moose::Meta::Attribute::Custom::Trait::MultiValued::Ranges::VERSION = '0.0.1_4'; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
{ |
25
|
|
|
|
|
|
|
$Moose::Meta::Attribute::Custom::Trait::MultiValued::Ranges::DIST = 'Data-MultiValued'; |
26
|
|
|
|
|
|
|
}{ |
27
|
2
|
|
|
2
|
|
1660
|
sub register_implementation { 'Data::MultiValued::AttributeTrait::Ranges' } |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
=pod |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=encoding utf-8 |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 NAME |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Data::MultiValued::AttributeTrait::Ranges - attribute traits for attributes holding ranged values |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 VERSION |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
version 0.0.1_4 |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 SYNOPSIS |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
package My::Class; |
48
|
|
|
|
|
|
|
use Moose; |
49
|
|
|
|
|
|
|
use Data::MultiValued::AttributeTrait::Ranges; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
has stuff => ( |
52
|
|
|
|
|
|
|
is => 'rw', |
53
|
|
|
|
|
|
|
isa => 'Int', |
54
|
|
|
|
|
|
|
traits => ['MultiValued::Ranges'], |
55
|
|
|
|
|
|
|
predicate => 'has_stuff', |
56
|
|
|
|
|
|
|
multi_accessor => 'stuff_tagged', |
57
|
|
|
|
|
|
|
multi_predicate => 'has_stuff_tagged', |
58
|
|
|
|
|
|
|
); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 DESCRIPTION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This role consumes L<Data::MultiValued::AttributeTrait> and |
63
|
|
|
|
|
|
|
specialises it to use L<Data::MultiValued::Ranges> as multi-value |
64
|
|
|
|
|
|
|
storage: |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 C<multivalue_storage_class> |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Returns C<'Data::MultiValued::Ranges'>. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 C<opts_to_pass_set> |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Returns C<('from', 'to')>. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 C<opts_to_pass_get> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Returns C<('at')>. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 AUTHOR |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Gianni Ceccarelli <dakkar@thenautilus.net> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
This software is copyright (c) 2011 by Net-a-Porter.com. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
87
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |
90
|
|
|
|
|
|
|
|