-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile.PL
More file actions
41 lines (36 loc) · 1.02 KB
/
Makefile.PL
File metadata and controls
41 lines (36 loc) · 1.02 KB
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
require 5.006;
use strict;
use warnings;
use ExtUtils::MakeMaker;
use File::Spec;
# We want it if we already have it. That way we skip the block below.
my $need_net_dns = !! eval { require Net::DNS; 1; };
unless ($need_net_dns) {
my $found_it;
my $ns = 'nslookup';
foreach my $path (File::Spec->path) {
my $file = File::Spec->catfile($path, $ns);
$found_it = "$file.exe" if ($^O eq 'MSWin32') and -x "$file.exe" and !-d _;
$found_it = $file if -x $file and !-d _;
}
$need_net_dns = ! $found_it;
}
WriteMakefile(
'NAME' => 'Email::Valid',
'VERSION_FROM' => 'lib/Email/Valid.pm',
MIN_PERL_VERSION => '5.006',
'PREREQ_PM' => {
'Test::More' => 0,
'Mail::Address' => 0,
'Scalar::Util' => 0, # for blessed()
($need_net_dns ? ('Net::DNS' => 0) : ()),
((!$need_net_dns and $^O =~ /\AMSWin32|Cygwin\z/)
? ('Capture::Tiny' => 0)
: ()
),
},
META_MERGE => {
"meta-spec" => { version => 2 },
dynamic_config => 1,
},
);