forked from Klortho/Physics-Unit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuild.PL
60 lines (53 loc) · 1.34 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 0.3601;
my $class = Module::Build->subclass(
code => <<'END_CODE'
use ExtUtils::Manifest qw/maniread maniadd/;
sub ACTION_manifest {
my $self = shift;
$self->SUPER::ACTION_manifest;
my $manifest = maniread;
my @podpl = grep { /^Gen(.*)\.pod\.PL$/ } keys %$manifest;
my %pod = map {
my $file = $_;
$file =~ s/^Gen(.*)\.PL$/$1/;
($file, "Generated Pod") } @podpl;
maniadd \%pod;
}
sub ACTION_docs {
my $self = shift;
$self->process_PL_files;
$self->SUPER::ACTION_docs;
}
END_CODE
);
my $build = $class->new(
module_name => "Physics::Unit",
dist_author => 'Christopher Maloney <[email protected]>',
license => "unrestricted",
build_requires => {
"Module::Build" => "0.3601",
"Test::More" => 0
},
configure_requires => {
"Module::Build" => "0.3601"
},
requires => {
"warnings" => 0,
},
PL_files => {
'lib/Physics/Unit/GenUnitsByName.pod.PL' => 'lib/Physics/Unit/UnitsByName.pod',
'lib/Physics/Unit/GenUnitsByType.pod.PL' => 'lib/Physics/Unit/UnitsByType.pod',
},
meta_merge => {
resources => {
repository => "https://github.com/Klortho/Physics-Unit",
bugtracker => "https://github.com/Klortho/Physics-Unit/issues",
},
#no_index => {
# file => [ 'README.pod' ],
#},
},
);
$build->create_build_script;