line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ORDB::CPANRelease; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1582
|
use 5.008005; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
37
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
5
|
1
|
|
|
1
|
|
15
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
6
|
1
|
|
|
1
|
|
1006
|
use Params::Util 0.38 (); |
|
1
|
|
|
|
|
3058
|
|
|
1
|
|
|
|
|
28
|
|
7
|
1
|
|
|
1
|
|
881
|
use ORLite::Mirror 1.12 (); |
|
1
|
|
|
|
|
243286
|
|
|
1
|
|
|
|
|
131
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub import { |
12
|
0
|
|
|
0
|
|
|
my $class = shift; |
13
|
0
|
|
0
|
|
|
|
my $params = Params::Util::_HASH(shift) || {}; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# Pass through any params from above |
16
|
0
|
|
0
|
|
|
|
$params->{url} ||= 'http://devel.cpantesters.org/release/release.db.gz'; |
17
|
0
|
|
0
|
|
|
|
$params->{maxage} ||= 24 * 60 * 60; # One day |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# Prevent double-initialisation |
20
|
0
|
0
|
|
|
|
|
$class->can('orlite') or |
21
|
|
|
|
|
|
|
ORLite::Mirror->import( $params ); |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
return 1; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |