line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
408
|
use 5.006; |
|
2
|
|
|
|
|
6
|
|
2
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
24
|
|
|
2
|
|
|
|
|
53
|
|
3
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
171
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package CPAN::Distribution::ReleaseHistory::ReleaseIterator; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.002005'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: A container to iterate a collection of releases for a single distribution |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
406
|
use Moo qw( has ); |
|
2
|
|
|
|
|
9825
|
|
|
2
|
|
|
|
|
13
|
|
14
|
2
|
|
|
2
|
|
2478
|
use CPAN::DistnameInfo; |
|
2
|
|
|
|
|
1954
|
|
|
2
|
|
|
|
|
67
|
|
15
|
2
|
|
|
2
|
|
918
|
use CPAN::Distribution::ReleaseHistory::Release; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
1349
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has 'scroller' => ( is => 'ro', required => 1 ); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub next_release { |
34
|
13
|
|
|
13
|
1
|
34252
|
my ($self) = @_; |
35
|
13
|
|
|
|
|
69
|
my $scroll_result = $self->scroller->next; |
36
|
13
|
50
|
|
|
|
231
|
return if not $scroll_result; |
37
|
|
|
|
|
|
|
|
38
|
13
|
|
33
|
|
|
44
|
my $data_hash = $scroll_result->{'_source'} || $scroll_result->{'fields'}; |
39
|
13
|
50
|
|
|
|
27
|
return if not $data_hash; |
40
|
|
|
|
|
|
|
|
41
|
13
|
|
|
|
|
23
|
my $path = $data_hash->{download_url}; |
42
|
13
|
|
|
|
|
103
|
$path =~ s{\A.*/authors/id/}{}msx; |
43
|
13
|
|
|
|
|
46
|
my $distinfo = CPAN::DistnameInfo->new($path); |
44
|
|
|
|
|
|
|
my $distname = |
45
|
|
|
|
|
|
|
defined($distinfo) && defined( $distinfo->dist ) |
46
|
|
|
|
|
|
|
? $distinfo->dist |
47
|
13
|
50
|
33
|
|
|
890
|
: $data_hash->{name}; |
48
|
|
|
|
|
|
|
return CPAN::Distribution::ReleaseHistory::Release->new( |
49
|
|
|
|
|
|
|
distname => $distname, |
50
|
|
|
|
|
|
|
path => $path, |
51
|
|
|
|
|
|
|
timestamp => $data_hash->{stat}->{mtime}, |
52
|
|
|
|
|
|
|
size => $data_hash->{stat}->{size}, |
53
|
13
|
|
|
|
|
465
|
); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
2
|
|
|
2
|
|
23
|
no Moo; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
9
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
__END__ |