-
Notifications
You must be signed in to change notification settings - Fork 2
/
Build.PL
60 lines (51 loc) · 1.54 KB
/
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
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
use strict;
use warnings;
use Module::Build;
use Module::CPANfile;
my $file = Module::CPANfile->load("cpanfile");
my $prereq = $file->prereq_specs;
my $build = Module::Build->subclass(
code => q{
sub ACTION_install {
die "Do not install web application.\n";
}
# do not make blib.
sub ACTION_code {
my $self = shift;
$self->depends_on('config_data');
}
# run prove
sub ACTION_test {
my $self = shift;
my $tests = $self->find_test_files;
require App::Prove;
my $prove = App::Prove->new();
$prove->process_args('-l', @$tests);
$prove->run();
}
}
)->new(
license => 'unknown',
dynamic_config => 0,
build_requires => {
$prereq->{build} ? %{$prereq->{build}->{requires}} : (),
$prereq->{test} ? %{$prereq->{test}->{requires}} : (),
},
configure_requires => {
%{$prereq->{configure}->{requires}},
},
requires => {
perl => '5.008001',
%{$prereq->{runtime}->{requires}},
},
no_index => { 'directory' => [ 'inc' ] },
name => 'CPANasium',
module_name => 'CPANasium',
author => 'Some Person <[email protected]>',
dist_abstract => 'A web site based on Amon2',
test_files => (-d '.git' || $ENV{RELEASE_TESTING}) ? 't/ xt/' : 't/',
recursive_test_files => 1,
create_readme => 0,
create_license => 0,
);
$build->create_build_script();