line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Portable::minicpan;
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
860
|
use 5.008;
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
45
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
6
|
1
|
|
|
1
|
|
5
|
use Portable::FileSpec;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
331
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '1.22';
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
#####################################################################
|
11
|
|
|
|
|
|
|
# Portable Driver API
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new {
|
14
|
0
|
|
|
0
|
0
|
|
my $class = shift;
|
15
|
0
|
|
|
|
|
|
my $parent = shift;
|
16
|
0
|
0
|
|
|
|
|
unless ( Portable::_HASH($parent->portable_minicpan) ) {
|
17
|
0
|
|
|
|
|
|
die('Missing or invalid minicpan key in portable.perl');
|
18
|
|
|
|
|
|
|
}
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Create the object
|
21
|
0
|
|
|
|
|
|
my $self = bless { }, $class;
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# Map paths to absolute paths
|
24
|
0
|
|
|
|
|
|
my $minicpan = $parent->portable_minicpan;
|
25
|
0
|
|
|
|
|
|
my $root = $parent->dist_root;
|
26
|
0
|
|
|
|
|
|
foreach my $key ( qw{ local } ) {
|
27
|
0
|
0
|
0
|
|
|
|
unless (
|
28
|
|
|
|
|
|
|
defined $minicpan->{$key}
|
29
|
|
|
|
|
|
|
and
|
30
|
|
|
|
|
|
|
length $minicpan->{$key}
|
31
|
|
|
|
|
|
|
) {
|
32
|
0
|
|
|
|
|
|
$self->{$key} = $minicpan->{$key};
|
33
|
0
|
|
|
|
|
|
next;
|
34
|
|
|
|
|
|
|
}
|
35
|
0
|
|
|
|
|
|
$self->{$key} = Portable::FileSpec::catdir(
|
36
|
|
|
|
|
|
|
$root, split /\//, $minicpan->{$key}
|
37
|
|
|
|
|
|
|
);
|
38
|
|
|
|
|
|
|
}
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
# Add the literal params
|
41
|
0
|
|
|
|
|
|
$self->{remote} = $minicpan->{remote};
|
42
|
0
|
|
|
|
|
|
$self->{quiet} = $minicpan->{quiet};
|
43
|
0
|
|
|
|
|
|
$self->{force} = $minicpan->{force};
|
44
|
0
|
|
|
|
|
|
$self->{offline} = $minicpan->{offline};
|
45
|
0
|
|
|
|
|
|
$self->{also_mirror} = $minicpan->{also_mirror};
|
46
|
0
|
|
|
|
|
|
$self->{module_filters} = $minicpan->{module_filters};
|
47
|
0
|
|
|
|
|
|
$self->{path_filters} = $minicpan->{path_filters};
|
48
|
0
|
|
|
|
|
|
$self->{skip_cleanup} = $minicpan->{skip_cleanup};
|
49
|
0
|
|
|
|
|
|
$self->{skip_perl} = $minicpan->{skip_perl};
|
50
|
0
|
|
|
|
|
|
$self->{no_conn_cache} = $minicpan->{no_conn_cache};
|
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
return $self;
|
53
|
|
|
|
|
|
|
}
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1;
|