line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ORDB::CPANMeta; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
926
|
use 5.008005; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
5
|
1
|
|
|
1
|
|
14
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
6
|
1
|
|
|
1
|
|
844
|
use Params::Util 1.00 (); |
|
1
|
|
|
|
|
3092
|
|
|
1
|
|
|
|
|
29
|
|
7
|
1
|
|
|
1
|
|
807
|
use ORLite::Mirror 1.15 (); |
|
1
|
|
|
|
|
160077
|
|
|
1
|
|
|
|
|
141
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.10'; |
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://svn.ali.as/db/cpanmeta.gz'; |
17
|
0
|
|
0
|
|
|
|
$params->{maxage} ||= 24 * 60 * 60; # One day |
18
|
0
|
|
0
|
|
|
|
$params->{user_version} ||= 10; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Prevent double-initialisation |
21
|
0
|
0
|
|
|
|
|
$class->can('orlite') or |
22
|
|
|
|
|
|
|
ORLite::Mirror->import( $params ); |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
return 1; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |