| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
507725
|
use 5.008; # utf8 |
|
|
1
|
|
|
|
|
3
|
|
|
2
|
1
|
|
|
1
|
|
3
|
use strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
18
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
34
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package inc::My::NeoMakeMaker; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: An example MakeMaker with Beam |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# AUTHORITY |
|
10
|
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
11
|
use Moose qw( around extends with has ); |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
6
|
|
|
12
|
|
|
|
|
|
|
extends 'Dist::Zilla::Plugin::MakeMaker'; |
|
13
|
|
|
|
|
|
|
with 'Beam::Emitter'; |
|
14
|
1
|
|
|
1
|
|
3296
|
use List::Util qw( first ); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
420
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# PS: This example shows exactly how much you need to piss around with EUMM |
|
17
|
|
|
|
|
|
|
# just to get some basic stuff done. |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
has 'static_attribution' => ( |
|
20
|
|
|
|
|
|
|
isa => 'Bool', |
|
21
|
|
|
|
|
|
|
is => 'ro', |
|
22
|
|
|
|
|
|
|
); |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
around write_makefile_args => sub { |
|
25
|
|
|
|
|
|
|
my ( $orig, $self, @args ) = @_; |
|
26
|
|
|
|
|
|
|
my $args = $self->$orig(@args); |
|
27
|
|
|
|
|
|
|
my $event = $_[1]->emit( |
|
28
|
|
|
|
|
|
|
'augment_makefile_args' => class => 'My::MakeMaker::Args', |
|
29
|
|
|
|
|
|
|
args => $args |
|
30
|
|
|
|
|
|
|
); |
|
31
|
|
|
|
|
|
|
return $event->args; |
|
32
|
|
|
|
|
|
|
}; |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
my $template = q!# This file was automatically generated by {{ $generated_by }}. |
|
35
|
|
|
|
|
|
|
use strict; |
|
36
|
|
|
|
|
|
|
use warnings; |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
{{ $perl_prereq ? qq[use $perl_prereq;] : ''; }} |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
use ExtUtils::MakeMaker{{ defined $eumm_version && 0+$eumm_version ? ' ' . $eumm_version : '' }}; |
|
41
|
|
|
|
|
|
|
{{ $share_dir_code{preamble} || '' }} |
|
42
|
|
|
|
|
|
|
my {{ $WriteMakefileArgs }} |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my {{ $fallback_prereqs }} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
XXXPRELUDEXXX |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { |
|
49
|
|
|
|
|
|
|
delete $WriteMakefileArgs{TEST_REQUIRES}; |
|
50
|
|
|
|
|
|
|
delete $WriteMakefileArgs{BUILD_REQUIRES}; |
|
51
|
|
|
|
|
|
|
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; |
|
52
|
|
|
|
|
|
|
} |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
delete $WriteMakefileArgs{CONFIGURE_REQUIRES} |
|
55
|
|
|
|
|
|
|
unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
WriteMakefile(%WriteMakefileArgs); |
|
58
|
|
|
|
|
|
|
{{ $share_dir_code{postamble} || '' }}!; |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub gather_files { |
|
61
|
1
|
|
|
1
|
0
|
121198
|
my ($self) = @_; |
|
62
|
|
|
|
|
|
|
|
|
63
|
1
|
|
|
|
|
7
|
require Dist::Zilla::File::InMemory; |
|
64
|
|
|
|
|
|
|
|
|
65
|
1
|
|
|
|
|
8
|
my $event = |
|
66
|
|
|
|
|
|
|
$self->emit( 'generate_prelude', class => 'My::MakeMaker::Prelude' ); |
|
67
|
|
|
|
|
|
|
|
|
68
|
1
|
|
|
|
|
45
|
$self->log_debug( [ "Prelude was <%s>", $event->prelude ] ); |
|
69
|
1
|
|
|
|
|
244
|
my $templ = $template; |
|
70
|
1
|
|
|
|
|
6
|
$templ =~ s{XXXPRELUDEXXX}{ $event->prelude }sex; |
|
|
1
|
|
|
|
|
33
|
|
|
71
|
|
|
|
|
|
|
|
|
72
|
1
|
|
|
|
|
32
|
my $file = Dist::Zilla::File::InMemory->new( |
|
73
|
|
|
|
|
|
|
{ |
|
74
|
|
|
|
|
|
|
name => 'Makefile.PL', |
|
75
|
|
|
|
|
|
|
content => $templ, # template evaluated later |
|
76
|
|
|
|
|
|
|
} |
|
77
|
|
|
|
|
|
|
); |
|
78
|
|
|
|
|
|
|
|
|
79
|
1
|
|
|
|
|
248
|
$self->add_file($file); |
|
80
|
1
|
|
|
|
|
526
|
return; |
|
81
|
|
|
|
|
|
|
} |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub setup_installer { |
|
84
|
1
|
|
|
1
|
0
|
24657
|
my ($self) = @_; |
|
85
|
|
|
|
|
|
|
|
|
86
|
1
|
|
|
|
|
5
|
my $write_makefile_args = $self->write_makefile_args; |
|
87
|
|
|
|
|
|
|
|
|
88
|
1
|
|
|
|
|
29
|
$self->__write_makefile_args($write_makefile_args); # save for testing |
|
89
|
|
|
|
|
|
|
|
|
90
|
1
|
|
|
|
|
8
|
my $perl_prereq = $write_makefile_args->{MIN_PERL_VERSION}; |
|
91
|
|
|
|
|
|
|
|
|
92
|
1
|
|
|
|
|
6
|
my $dumped_args = |
|
93
|
|
|
|
|
|
|
$self->_dump_as( $write_makefile_args, '*WriteMakefileArgs' ); |
|
94
|
|
|
|
|
|
|
|
|
95
|
1
|
|
|
8
|
|
134
|
my $file = first { $_->name eq 'Makefile.PL' } @{ $self->zilla->files }; |
|
|
8
|
|
|
|
|
228
|
|
|
|
1
|
|
|
|
|
28
|
|
|
96
|
|
|
|
|
|
|
|
|
97
|
1
|
|
|
|
|
37
|
$self->log_debug( ['updating contents of Makefile.PL in memory'] ); |
|
98
|
|
|
|
|
|
|
|
|
99
|
1
|
50
|
50
|
|
|
418
|
my $attribution = |
|
100
|
|
|
|
|
|
|
$self->static_attribution |
|
101
|
|
|
|
|
|
|
? ref($self) |
|
102
|
|
|
|
|
|
|
: sprintf( "%s v%s", ref($self), $self->VERSION || '(dev)' ); |
|
103
|
|
|
|
|
|
|
|
|
104
|
1
|
|
|
|
|
26
|
my $event = $self->emit( |
|
105
|
|
|
|
|
|
|
'augment_template_args', |
|
106
|
|
|
|
|
|
|
class => 'My::MakeMaker::TemplateArgs', |
|
107
|
|
|
|
|
|
|
args => { |
|
108
|
|
|
|
|
|
|
eumm_version => \( $self->eumm_version ), |
|
109
|
|
|
|
|
|
|
perl_prereq => \$perl_prereq, |
|
110
|
|
|
|
|
|
|
share_dir_code => $self->share_dir_code, |
|
111
|
|
|
|
|
|
|
fallback_prereqs => \( $self->fallback_prereq_pm ), |
|
112
|
|
|
|
|
|
|
WriteMakefileArgs => \$dumped_args, |
|
113
|
|
|
|
|
|
|
generated_by => \$attribution, |
|
114
|
|
|
|
|
|
|
} |
|
115
|
|
|
|
|
|
|
); |
|
116
|
1
|
|
|
|
|
14
|
my $content = $self->fill_in_string( $file->content, $event->args, ); |
|
117
|
|
|
|
|
|
|
|
|
118
|
1
|
|
|
|
|
1446
|
$file->content($content); |
|
119
|
|
|
|
|
|
|
|
|
120
|
1
|
|
|
|
|
264
|
return; |
|
121
|
|
|
|
|
|
|
} |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
124
|
1
|
|
|
1
|
|
5
|
no Moose; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
3
|
|
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
package My::MakeMaker::Args; |
|
127
|
|
|
|
|
|
|
|
|
128
|
1
|
|
|
1
|
|
96
|
use Moose qw( extends has ); |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
3
|
|
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
extends 'Beam::Event'; |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
has 'args' => ( is => 'ro', required => 1 ); |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
135
|
|
|
|
|
|
|
|
|
136
|
1
|
|
|
1
|
|
3349
|
no Moose; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
3
|
|
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
package My::MakeMaker::Prelude; |
|
139
|
|
|
|
|
|
|
|
|
140
|
1
|
|
|
1
|
|
72
|
use Moose qw( extends has ); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
2
|
|
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
extends 'Beam::Event'; |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
has 'prelude' => ( is => 'rw', default => '' ); |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
147
|
|
|
|
|
|
|
|
|
148
|
1
|
|
|
1
|
|
3062
|
no Moose; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
4
|
|
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
package My::MakeMaker::TemplateArgs; |
|
151
|
|
|
|
|
|
|
|
|
152
|
1
|
|
|
1
|
|
74
|
use Moose qw( extends has ); |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
3
|
|
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
extends 'Beam::Event'; |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
has 'args' => ( is => 'ro', required => 1 ); |
|
157
|
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
159
|
|
|
|
|
|
|
|
|
160
|
1
|
|
|
1
|
|
3070
|
no Moose; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
3
|
|
|
161
|
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
1; |