line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::New::File::MakeMaker; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
681
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
71
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
48
|
|
5
|
2
|
|
|
2
|
|
7
|
use Module::New::File; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
12
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
file 'Makefile.PL' => content { return <<'EOT'; |
8
|
|
|
|
|
|
|
use strict; |
9
|
|
|
|
|
|
|
use warnings; |
10
|
|
|
|
|
|
|
use ExtUtils::MakeMaker; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my %params = ( |
13
|
|
|
|
|
|
|
NAME => '<%= $c->module %>', |
14
|
|
|
|
|
|
|
AUTHOR => '<%= $c->config('author') %> <<%= $c->config('email') %>>', |
15
|
|
|
|
|
|
|
VERSION_FROM => '<%= $c->mainfile %>', |
16
|
|
|
|
|
|
|
ABSTRACT_FROM => '<%= $c->mainfile %>', |
17
|
|
|
|
|
|
|
LICENSE => '<%= $c->config('license') || 'perl' %>', |
18
|
|
|
|
|
|
|
PREREQ_PM => { |
19
|
|
|
|
|
|
|
}, |
20
|
|
|
|
|
|
|
BUILD_REQUIRES => { |
21
|
|
|
|
|
|
|
'Test::More' => '0.88', # done_testing |
22
|
|
|
|
|
|
|
'Test::UseAllModules' => '0.10', |
23
|
|
|
|
|
|
|
}, |
24
|
|
|
|
|
|
|
META_MERGE => { |
25
|
|
|
|
|
|
|
resources => { |
26
|
|
|
|
|
|
|
repository => '<%= $c->repository %>', |
27
|
|
|
|
|
|
|
}, |
28
|
|
|
|
|
|
|
}, |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
my $eumm = eval $ExtUtils::MakeMaker::VERSION; |
32
|
|
|
|
|
|
|
delete $params{LICENSE} if $eumm < 6.31; |
33
|
|
|
|
|
|
|
delete $params{MIN_PERL_VERSION} if $eumm < 6.48; |
34
|
|
|
|
|
|
|
delete $params{META_MERGE} if $eumm < 6.46; |
35
|
|
|
|
|
|
|
delete $params{META_ADD} if $eumm < 6.46; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
if ($eumm < 6.52 && $params{CONFIGURE_REQUIRES}) { |
38
|
|
|
|
|
|
|
$params{PREREQ_PM} = { |
39
|
|
|
|
|
|
|
%{ $params{PREREQ_PM} || {} }, |
40
|
|
|
|
|
|
|
%{ $params{CONFIGURE_REQUIRES} }, |
41
|
|
|
|
|
|
|
}; |
42
|
|
|
|
|
|
|
delete $params{CONFIGURE_REQUIRES}; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
if ($eumm < 6.5503 && $params{BUILD_REQUIRES}) { |
45
|
|
|
|
|
|
|
$params{PREREQ_PM} = { |
46
|
|
|
|
|
|
|
%{ $params{PREREQ_PM} || {} }, |
47
|
|
|
|
|
|
|
%{ $params{BUILD_REQUIRES} }, |
48
|
|
|
|
|
|
|
}; |
49
|
|
|
|
|
|
|
delete $params{BUILD_REQUIRES}; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
WriteMakefile(%params); |
53
|
|
|
|
|
|
|
EOT |
54
|
|
|
|
|
|
|
}; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |