line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
19
|
|
|
19
|
|
141
|
use strict; |
|
19
|
|
|
|
|
48
|
|
|
19
|
|
|
|
|
604
|
|
2
|
19
|
|
|
19
|
|
110
|
use warnings; |
|
19
|
|
|
|
|
54
|
|
|
19
|
|
|
|
|
823
|
|
3
|
|
|
|
|
|
|
package MetaCPAN::Client::Rating; |
4
|
|
|
|
|
|
|
# ABSTRACT: A Rating data object |
5
|
|
|
|
|
|
|
$MetaCPAN::Client::Rating::VERSION = '2.028000'; |
6
|
19
|
|
|
19
|
|
117
|
use Moo; |
|
19
|
|
|
|
|
39
|
|
|
19
|
|
|
|
|
112
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'MetaCPAN::Client::Role::Entity'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my %known_fields = ( |
11
|
|
|
|
|
|
|
scalar => [qw< |
12
|
|
|
|
|
|
|
author |
13
|
|
|
|
|
|
|
date |
14
|
|
|
|
|
|
|
details |
15
|
|
|
|
|
|
|
distribution |
16
|
|
|
|
|
|
|
helpful |
17
|
|
|
|
|
|
|
rating |
18
|
|
|
|
|
|
|
release |
19
|
|
|
|
|
|
|
user |
20
|
|
|
|
|
|
|
>], |
21
|
|
|
|
|
|
|
arrayref => [], |
22
|
|
|
|
|
|
|
hashref => [], |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my @known_fields = |
26
|
|
|
|
|
|
|
map { @{ $known_fields{$_} } } qw< scalar arrayref hashref >; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
foreach my $field (@known_fields) { |
29
|
|
|
|
|
|
|
has $field => ( |
30
|
|
|
|
|
|
|
is => 'ro', |
31
|
|
|
|
|
|
|
lazy => 1, |
32
|
|
|
|
|
|
|
default => sub { |
33
|
|
|
|
|
|
|
my $self = shift; |
34
|
|
|
|
|
|
|
return $self->data->{$field}; |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
2
|
|
|
2
|
|
58
|
sub _known_fields { return \%known_fields } |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |