line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
498
|
use 5.006; # our |
|
3
|
|
|
|
|
6
|
|
2
|
3
|
|
|
3
|
|
10
|
use strict; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
54
|
|
3
|
3
|
|
|
3
|
|
8
|
use warnings; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
194
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package App::cpanm::meta::checker::State::Duplicates; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.001002'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Data tracking for duplicate distribution meta-data |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
488
|
use Moo qw( has ); |
|
3
|
|
|
|
|
9598
|
|
|
3
|
|
|
|
|
18
|
|
14
|
3
|
|
|
3
|
|
2624
|
use App::cpanm::meta::checker::State::Duplicates::Dist; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
702
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has 'dists' => ( |
21
|
|
|
|
|
|
|
is => ro =>, |
22
|
|
|
|
|
|
|
lazy => 1, |
23
|
0
|
|
|
0
|
|
|
builder => sub { {} }, |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub seen_dist_version { |
33
|
0
|
|
|
0
|
1
|
|
my ( $self, $dist, $version ) = @_; |
34
|
0
|
0
|
|
|
|
|
if ( not exists $self->dists->{$dist} ) { |
35
|
0
|
|
|
|
|
|
$self->dists->{$dist} = App::cpanm::meta::checker::State::Duplicates::Dist->new(); |
36
|
|
|
|
|
|
|
} |
37
|
0
|
|
|
|
|
|
return $self->dists->{$dist}->seen_version($version); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub has_duplicates { |
49
|
0
|
|
|
0
|
1
|
|
my ( $self, $dist ) = @_; |
50
|
0
|
0
|
|
|
|
|
return unless exists $self->dists->{$dist}; |
51
|
0
|
|
|
|
|
|
return $self->dists->{$dist}->has_duplicates; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub reported_duplicates { |
64
|
0
|
|
|
0
|
1
|
|
my ( $self, $dist, $set_reported ) = @_; |
65
|
0
|
0
|
|
|
|
|
return unless exists $self->dists->{$dist}; |
66
|
0
|
0
|
|
|
|
|
return $self->dists->{$dist}->reported($set_reported) if @_ > 2; |
67
|
0
|
|
|
|
|
|
return $self->dists->{$dist}->reported(); |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub duplicate_versions { |
79
|
0
|
|
|
0
|
1
|
|
my ( $self, $dist ) = @_; |
80
|
0
|
0
|
|
|
|
|
return unless exists $self->dists->{$dist}; |
81
|
0
|
|
|
|
|
|
return $self->dists->{$dist}->duplicate_versions; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
1; |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
__END__ |