-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.PL
40 lines (35 loc) · 1.02 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
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Math::Random::MT::Perl',
VERSION_FROM => 'lib/Math/Random/MT/Perl.pm',
PREREQ_PM => {
'Test::More' => 0,
'Test::Number::Delta' => 0,
get_opt_test_mods(),
},
($] >= 5.005 ?
(ABSTRACT_FROM => 'lib/Math/Random/MT/Perl.pm',
AUTHOR => 'Dr James Freeman') :
()
),
LICENSE => 'artistic_2',
realclean => { FILES => 'Math-Random-MT-Perl* *.tmp *.bak' },
);
sub get_opt_test_mods {
# Find which optional modules used in unit tests are available
my @avail_mods;
my %opt_modules = (
'Math::Random::MT' => 0,
'Test::Kwalitee' => 0,
'Test::Pod' => '1.00',
'Test::Pod::Coverage' => '1.00',
'Test::Spelling' => 0,
);
while (my ($module, $version) = each %opt_modules) {
eval "require $module;";
if (! $@) {
push @avail_mods, $module, $version;
}
}
return @avail_mods;
}