-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBuild.PL
33 lines (26 loc) · 961 Bytes
/
Build.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
# @(#)$Ident: Build.PL 2013-12-14 14:26 pjf ;
use strict;
use warnings;
use Module::Build ##{ $meta2{prereqs}->{configure}->{requires}->{'Module::Build'} ##};
sub whimper { print {*STDOUT} $_[ 0 ]."\n"; exit 0 }
my $perl_ver = ##{ $meta2{prereqs}->{runtime}->{requires}->{perl} ##};
my $name = '##{ $zilla->name ##}'; $name =~ s{ - }{::}gmx;
my $prereqs = {
##{ $plugin->get_prereqs( 1 ) ##}
};
if ($] < $perl_ver) {
$ENV{AUTOMATED_TESTING}
or $ENV{PERL_CPAN_REPORTER_CONFIG}
or $ENV{PERL5_CPANPLUS_IS_VERSION}
or whimper "Minimum required Perl version is ${perl_ver}";
$prereqs->{build_requires} = { %{ $prereqs->{configure_requires} } };
$prereqs->{build_requires}->{ 'Test::Requires' } = 0.06;
delete $prereqs->{requires};
}
Module::Build->new(
'module_name' => $name,
'notes' => { min_perl_version => $perl_ver },
%{ $prereqs },
##{ $plugin->get_default('share_dir') ##}
)->create_build_script;
exit 0;