line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Install::MakeMaker; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1569
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
6
|
use ExtUtils::MakeMaker (); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
13
|
|
5
|
1
|
|
|
1
|
|
16
|
use Module::Install::Base (); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
20
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
4
|
use vars qw{$VERSION @ISA $ISCORE}; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
81
|
|
8
|
|
|
|
|
|
|
BEGIN { |
9
|
1
|
|
|
1
|
|
5
|
$VERSION = '1.21'; |
10
|
1
|
|
|
|
|
22
|
@ISA = 'Module::Install::Base'; |
11
|
1
|
|
|
|
|
358
|
$ISCORE = 1; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $makefile = undef; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub WriteMakefile { |
17
|
0
|
|
|
0
|
0
|
|
my ($self, %args) = @_; |
18
|
0
|
|
|
|
|
|
$makefile = $self->load('Makefile'); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# mapping between MakeMaker and META.yml keys |
21
|
0
|
|
|
|
|
|
$args{MODULE_NAME} = $args{NAME}; |
22
|
0
|
0
|
0
|
|
|
|
unless ( $args{NAME} = $args{DISTNAME} or ! $args{MODULE_NAME} ) { |
23
|
0
|
|
|
|
|
|
$args{NAME} = $args{MODULE_NAME}; |
24
|
0
|
|
|
|
|
|
$args{NAME} =~ s/::/-/g; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
foreach my $key ( qw{name module_name version version_from abstract author installdirs} ) { |
28
|
0
|
0
|
|
|
|
|
my $value = delete($args{uc($key)}) or next; |
29
|
0
|
|
|
|
|
|
$self->$key($value); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
0
|
0
|
|
|
|
|
if (my $prereq = delete($args{PREREQ_PM})) { |
33
|
0
|
|
|
|
|
|
while (my($k,$v) = each %$prereq) { |
34
|
0
|
|
|
|
|
|
$self->requires($k,$v); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
0
|
0
|
|
|
|
|
if (my $prereq = delete($args{BUILD_REQUIRES})) { |
39
|
0
|
|
|
|
|
|
while (my($k,$v) = each %$prereq) { |
40
|
0
|
|
|
|
|
|
$self->build_requires($k,$v); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# put the remaining args to makemaker_args |
45
|
0
|
|
|
|
|
|
$self->makemaker_args(%args); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
END { |
49
|
1
|
50
|
|
1
|
|
3187
|
if ( $makefile ) { |
50
|
0
|
|
|
|
|
|
$makefile->write; |
51
|
0
|
|
|
|
|
|
$makefile->Meta->write; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |