-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.PL
executable file
·65 lines (55 loc) · 1.59 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
61
62
63
64
65
#!/bin/env perl
use 5.006;
use strict;
use warnings;
use Module::Build;
Module::Build->VERSION( '0.4004' );
my $class = Module::Build->subclass(
code => q{
use Cwd qw( cwd );
#---------------------------------
# Build
#---------------------------------
sub ACTION_build {
my ($s) = @_;
$s->_readme();
$s->SUPER::ACTION_build;
}
# Only for the maintainer on "Build build".
sub _readme {
my ($s) = @_;
return if cwd() !~ m{ / git / perlmy / [^/]+ $ }x;
my ($installed) =
grep { -x "$_/pod2markdown" }
split /:/, $ENV{PATH};
return if !$installed;
print "Building README\n";
my $lib = $s->{properties}{dist_version_from};
system "pod2markdown $lib > README.md";
}
},
);
my $builder = $class->new(
module_name => 'Pod::LOL',
license => 'artistic_2',
dist_author => q{Tim Potapov <tim.potapov[AT]gmail.com>},
dist_version_from => 'lib/Pod/LOL.pm',
release_status => 'stable',
configure_requires => {
'Module::Build' => '0.4004',
},
test_requires => {
'Test::More' => '0',
},
requires => {
'perl' => '5.012',
},
add_to_cleanup => ['Pod-LOL-*'],
meta_merge => {
resources => {
bugtracker => 'https://github.com/poti1/pod-lol/issues',
repository => 'https://github.com/poti1/pod-lol',
},
},
);
$builder->create_build_script();