line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Install::AutoInstall; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
928
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
4
|
use Module::Install::Base (); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
15
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
3
|
use vars qw{$VERSION @ISA $ISCORE}; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
62
|
|
7
|
|
|
|
|
|
|
BEGIN { |
8
|
1
|
|
|
1
|
|
1
|
$VERSION = '1.18'; |
9
|
1
|
|
|
|
|
9
|
@ISA = 'Module::Install::Base'; |
10
|
1
|
|
|
|
|
430
|
$ISCORE = 1; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
0
|
0
|
|
sub AutoInstall { $_[0] } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub run { |
16
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
17
|
0
|
|
|
|
|
|
$self->auto_install_now(@_); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub write { |
21
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
22
|
0
|
|
|
|
|
|
$self->auto_install(@_); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub auto_install { |
26
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
27
|
0
|
0
|
|
|
|
|
return if $self->{done}++; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# Flatten array of arrays into a single array |
30
|
0
|
|
|
|
|
|
my @core = map @$_, map @$_, grep ref, |
31
|
|
|
|
|
|
|
$self->build_requires, $self->requires; |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
my @config = @_; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# We'll need Module::AutoInstall |
36
|
0
|
|
|
|
|
|
$self->include('Module::AutoInstall'); |
37
|
0
|
|
|
|
|
|
require Module::AutoInstall; |
38
|
|
|
|
|
|
|
|
39
|
0
|
0
|
|
|
|
|
my @features_require = Module::AutoInstall->import( |
|
|
0
|
|
|
|
|
|
40
|
|
|
|
|
|
|
(@config ? (-config => \@config) : ()), |
41
|
|
|
|
|
|
|
(@core ? (-core => \@core) : ()), |
42
|
|
|
|
|
|
|
$self->features, |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
my %seen; |
46
|
0
|
|
|
|
|
|
my @requires = map @$_, map @$_, grep ref, $self->requires; |
47
|
0
|
|
|
|
|
|
while (my ($mod, $ver) = splice(@requires, 0, 2)) { |
48
|
0
|
|
|
|
|
|
$seen{$mod}{$ver}++; |
49
|
|
|
|
|
|
|
} |
50
|
0
|
|
|
|
|
|
my @build_requires = map @$_, map @$_, grep ref, $self->build_requires; |
51
|
0
|
|
|
|
|
|
while (my ($mod, $ver) = splice(@build_requires, 0, 2)) { |
52
|
0
|
|
|
|
|
|
$seen{$mod}{$ver}++; |
53
|
|
|
|
|
|
|
} |
54
|
0
|
|
|
|
|
|
my @configure_requires = map @$_, map @$_, grep ref, $self->configure_requires; |
55
|
0
|
|
|
|
|
|
while (my ($mod, $ver) = splice(@configure_requires, 0, 2)) { |
56
|
0
|
|
|
|
|
|
$seen{$mod}{$ver}++; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
0
|
|
|
|
|
|
my @deduped; |
60
|
0
|
|
|
|
|
|
while (my ($mod, $ver) = splice(@features_require, 0, 2)) { |
61
|
0
|
0
|
|
|
|
|
push @deduped, $mod => $ver unless $seen{$mod}{$ver}++; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
$self->requires(@deduped); |
65
|
|
|
|
|
|
|
|
66
|
0
|
|
|
|
|
|
$self->makemaker_args( Module::AutoInstall::_make_args() ); |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
my $class = ref($self); |
69
|
0
|
|
|
|
|
|
$self->postamble( |
70
|
|
|
|
|
|
|
"# --- $class section:\n" . |
71
|
|
|
|
|
|
|
Module::AutoInstall::postamble() |
72
|
|
|
|
|
|
|
); |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub installdeps_target { |
76
|
0
|
|
|
0
|
0
|
|
my ($self, @args) = @_; |
77
|
|
|
|
|
|
|
|
78
|
0
|
|
|
|
|
|
$self->include('Module::AutoInstall'); |
79
|
0
|
|
|
|
|
|
require Module::AutoInstall; |
80
|
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
|
Module::AutoInstall::_installdeps_target(1); |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
|
$self->auto_install(@args); |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
sub auto_install_now { |
87
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
88
|
0
|
|
|
|
|
|
$self->auto_install(@_); |
89
|
0
|
|
|
|
|
|
Module::AutoInstall::do_install(); |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
1; |