line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
19
|
|
|
19
|
|
121
|
use strict; |
|
19
|
|
|
|
|
35
|
|
|
19
|
|
|
|
|
527
|
|
2
|
19
|
|
|
19
|
|
86
|
use warnings; |
|
19
|
|
|
|
|
46
|
|
|
19
|
|
|
|
|
713
|
|
3
|
|
|
|
|
|
|
package MetaCPAN::Client::Author; |
4
|
|
|
|
|
|
|
# ABSTRACT: An Author data object |
5
|
|
|
|
|
|
|
$MetaCPAN::Client::Author::VERSION = '2.030000'; |
6
|
19
|
|
|
19
|
|
91
|
use Moo; |
|
19
|
|
|
|
|
45
|
|
|
19
|
|
|
|
|
115
|
|
7
|
19
|
|
|
19
|
|
5807
|
use Ref::Util qw< is_arrayref >; |
|
19
|
|
|
|
|
39
|
|
|
19
|
|
|
|
|
6710
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with 'MetaCPAN::Client::Role::Entity'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my %known_fields = ( |
12
|
|
|
|
|
|
|
scalar => [qw< |
13
|
|
|
|
|
|
|
city |
14
|
|
|
|
|
|
|
country |
15
|
|
|
|
|
|
|
gravatar_url |
16
|
|
|
|
|
|
|
name |
17
|
|
|
|
|
|
|
ascii_name |
18
|
|
|
|
|
|
|
pauseid |
19
|
|
|
|
|
|
|
region |
20
|
|
|
|
|
|
|
updated |
21
|
|
|
|
|
|
|
user |
22
|
|
|
|
|
|
|
>], |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
arrayref => [qw< |
25
|
|
|
|
|
|
|
donation |
26
|
|
|
|
|
|
|
email |
27
|
|
|
|
|
|
|
perlmongers |
28
|
|
|
|
|
|
|
profile |
29
|
|
|
|
|
|
|
website |
30
|
|
|
|
|
|
|
>], |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
hashref => [qw< |
33
|
|
|
|
|
|
|
blog |
34
|
|
|
|
|
|
|
extra |
35
|
|
|
|
|
|
|
links |
36
|
|
|
|
|
|
|
release_count |
37
|
|
|
|
|
|
|
>], |
38
|
|
|
|
|
|
|
); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub BUILDARGS { |
41
|
32
|
|
|
32
|
1
|
7095
|
my ( $class, %args ) = @_; |
42
|
|
|
|
|
|
|
|
43
|
32
|
|
50
|
|
|
130
|
my $email = $args{'email'} || []; |
44
|
32
|
50
|
|
|
|
71
|
$args{'email'} = [ $email ] |
45
|
|
|
|
|
|
|
unless is_arrayref($email); |
46
|
|
|
|
|
|
|
|
47
|
32
|
|
|
|
|
474
|
return \%args; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
my @known_fields = |
51
|
|
|
|
|
|
|
map { @{ $known_fields{$_} } } qw< scalar arrayref hashref >; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
foreach my $field ( @known_fields ) { |
54
|
|
|
|
|
|
|
has $field => ( |
55
|
|
|
|
|
|
|
is => 'ro', |
56
|
|
|
|
|
|
|
lazy => 1, |
57
|
|
|
|
|
|
|
default => sub { |
58
|
|
|
|
|
|
|
my $self = shift; |
59
|
|
|
|
|
|
|
return $self->data->{$field}; |
60
|
|
|
|
|
|
|
}, |
61
|
|
|
|
|
|
|
); |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
32
|
|
|
32
|
|
68
|
sub _known_fields { \%known_fields } |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub releases { |
67
|
1
|
|
|
1
|
1
|
50
|
my $self = shift; |
68
|
1
|
|
|
|
|
19
|
my $id = $self->pauseid; |
69
|
|
|
|
|
|
|
|
70
|
1
|
|
|
|
|
16
|
return $self->client->release({ |
71
|
|
|
|
|
|
|
all => [ |
72
|
|
|
|
|
|
|
{ author => $id }, |
73
|
|
|
|
|
|
|
{ status => 'latest' }, |
74
|
|
|
|
|
|
|
] |
75
|
|
|
|
|
|
|
}); |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
0
|
|
|
0
|
1
|
|
sub dir { $_[0]->links->{cpan_directory} } |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
0
|
1
|
|
sub metacpan_url { "https://metacpan.org/author/" . $_[0]->pauseid } |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
1; |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
__END__ |