line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Declare our package |
2
|
|
|
|
|
|
|
package CPAN::WWW::Top100::Retrieve::Dist; |
3
|
1
|
|
|
1
|
|
1169
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# Initialize our version |
6
|
1
|
|
|
1
|
|
5
|
use vars qw( $VERSION ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
62
|
|
7
|
|
|
|
|
|
|
$VERSION = '0.01'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# import the Moose stuff |
10
|
1
|
|
|
1
|
|
454
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use MooseX::StrictConstructor; |
12
|
|
|
|
|
|
|
use namespace::autoclean; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has 'type' => ( |
15
|
|
|
|
|
|
|
isa => 'Str', |
16
|
|
|
|
|
|
|
is => 'ro', |
17
|
|
|
|
|
|
|
required => 1, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has 'dbid' => ( |
21
|
|
|
|
|
|
|
isa => 'Int', |
22
|
|
|
|
|
|
|
is => 'ro', |
23
|
|
|
|
|
|
|
required => 1, |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# Common to all types |
27
|
|
|
|
|
|
|
has 'rank' => ( |
28
|
|
|
|
|
|
|
isa => 'Int', |
29
|
|
|
|
|
|
|
is => 'ro', |
30
|
|
|
|
|
|
|
required => 1, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
has 'author' => ( |
34
|
|
|
|
|
|
|
isa => 'Str', |
35
|
|
|
|
|
|
|
is => 'ro', |
36
|
|
|
|
|
|
|
required => 1, |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
has 'dist' => ( |
40
|
|
|
|
|
|
|
isa => 'Str', |
41
|
|
|
|
|
|
|
is => 'ro', |
42
|
|
|
|
|
|
|
required => 1, |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
has 'score' => ( |
46
|
|
|
|
|
|
|
isa => 'Int', |
47
|
|
|
|
|
|
|
is => 'ro', |
48
|
|
|
|
|
|
|
required => 1, |
49
|
|
|
|
|
|
|
); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
# from Moose::Manual::BestPractices |
52
|
|
|
|
|
|
|
no Moose; |
53
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
__END__ |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=for stopwords todo dbid dist |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 NAME |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
CPAN::WWW::Top100::Retrieve::Dist - Represents a distribution listed in the Top100 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 SYNOPSIS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
#!/usr/bin/perl |
67
|
|
|
|
|
|
|
use strict; use warnings; |
68
|
|
|
|
|
|
|
use CPAN::WWW::Top100::Retrieve; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
my $top100 = CPAN::WWW::Top100::Retrieve->new; |
71
|
|
|
|
|
|
|
foreach my $dist ( @{ $top100->list( 'heavy' ) } ) { |
72
|
|
|
|
|
|
|
print "Heavy dist(" . $dist->dist . ") rank(" . $dist->rank . |
73
|
|
|
|
|
|
|
") author(" . $dist->author . ") score(" . |
74
|
|
|
|
|
|
|
$dist->score . ")\n"; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 DESCRIPTION |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
This module holds the info for a distribution listed in the Top100. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head2 Attributes |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Those attributes hold information about the distribution. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head3 type |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
The type of Top100 this dist is listed on. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
example: heavy |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head3 dbid |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
The dbid of Top100 this dist is listed on. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head3 rank |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
The rank of this dist on the Top100 list. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head3 author |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
The author of this dist. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head3 dist |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
The distribution name. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head3 score |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
The score of the distribution on the Top100 list. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
If the type is: heavy |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
The score is the number of downstream dependencies |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
If the type is: volatile, debian, downstream, meta1/2/3 |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
The score is the number of dependent modules |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
If the type is: fail |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
The score is the FAIL score |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 AUTHOR |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Apocalypse E<lt>apocal@cpan.orgE<gt> |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Copyright 2010 by Apocalypse |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
132
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
The full text of the license can be found in the LICENSE file included with this module. |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=cut |
137
|
|
|
|
|
|
|
|