-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile.PL
126 lines (111 loc) · 3.65 KB
/
Makefile.PL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.030.
use strict;
use warnings;
use 5.010;
use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
"ABSTRACT" => "Lightweight Dependency Injection Container",
"AUTHOR" => "Doug Bell <preaction\@cpan.org>, Al Newkirk <anewkirk\@ana.io>",
"CONFIGURE_REQUIRES" => {
"CPAN::Meta::Requirements" => "2.120620",
"ExtUtils::MakeMaker" => 0,
"Module::Metadata" => 0
},
"DISTNAME" => "Beam-Wire",
"EXE_FILES" => [
"bin/beam-wire"
],
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.010",
"NAME" => "Beam::Wire",
"PREREQ_PM" => {
"Beam::Emitter" => 0,
"Beam::Service" => 0,
"Config::Any" => "0.23",
"Data::DPath" => "0.51",
"Module::Runtime" => 0,
"Moo" => 0,
"Path::Tiny" => "0.055",
"Throwable" => 0,
"Types::Standard" => 0,
"YAML" => 0
},
"TEST_REQUIRES" => {
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Test::Deep" => 0,
"Test::Differences" => "0.64",
"Test::Exception" => 0,
"Test::Lib" => 0,
"Test::More" => "1.001005"
},
"VERSION" => "1.027",
"test" => {
"TESTS" => "t/*.t t/container/*.t t/dependency/*.t t/deprecated/*.t t/method/*.t t/regression/*.t t/service/*.t"
}
);
my %FallbackPrereqs = (
"Beam::Emitter" => 0,
"Beam::Service" => 0,
"Config::Any" => "0.23",
"Data::DPath" => "0.51",
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Module::Runtime" => 0,
"Moo" => 0,
"Path::Tiny" => "0.055",
"Test::Deep" => 0,
"Test::Differences" => "0.64",
"Test::Exception" => 0,
"Test::Lib" => 0,
"Test::More" => "1.001005",
"Throwable" => 0,
"Types::Standard" => 0,
"YAML" => 0
);
# inserted by Dist::Zilla::Plugin::DynamicPrereqs 0.034
# Breaks LoadFile(path(...))
has_module('YAML::XS','== 0.61') and requires('YAML::XS','0.62');
unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
delete $WriteMakefileArgs{BUILD_REQUIRES};
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
WriteMakefile(%WriteMakefileArgs);
# inserted by Dist::Zilla::Plugin::DynamicPrereqs 0.034
sub _add_prereq {
my ($mm_key, $module, $version_or_range) = @_;
$version_or_range ||= 0;
warn "$module already exists in $mm_key (at version $WriteMakefileArgs{$mm_key}{$module}) -- need to do a sane metamerge!"
if exists $WriteMakefileArgs{$mm_key}{$module}
and $WriteMakefileArgs{$mm_key}{$module} ne '0'
and $WriteMakefileArgs{$mm_key}{$module} ne $version_or_range;
warn "$module already exists in FallbackPrereqs (at version $WriteMakefileArgs{$mm_key}{$module}) -- need to do a sane metamerge!"
if exists $FallbackPrereqs{$module} and $FallbackPrereqs{$module} ne '0'
and $FallbackPrereqs{$module} ne $version_or_range;
$WriteMakefileArgs{$mm_key}{$module} = $FallbackPrereqs{$module} = $version_or_range;
return;
}
sub has_module {
my ($module, $version_or_range) = @_;
require Module::Metadata;
my $mmd = Module::Metadata->new_from_module($module);
return undef if not $mmd;
return $mmd->version($module) if not defined $version_or_range;
require CPAN::Meta::Requirements;
my $req = CPAN::Meta::Requirements->new;
$req->add_string_requirement($module => $version_or_range);
return 1 if $req->accepts_module($module => $mmd->version($module));
return 0;
}
sub requires { goto &runtime_requires }
sub runtime_requires {
my ($module, $version_or_range) = @_;
_add_prereq(PREREQ_PM => $module, $version_or_range);
}