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
|
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 = 1 if 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',
(eval { ExtUtils::MakeMaker->VERSION(6.21) } ? (LICENSE => 'perl') : ()),
'PREREQ_PM' => {
'Test::More' => 0,
'Mail::Address' => 0,
($need_net_dns ? ('Net::DNS' => 0) : ()),
((!$need_net_dns and $^O =~ /\AMSWin32|Cygwin\z/)
? ('IO::CaptureOutput' => 0)
: ()
),
},
'dist' => { 'COMPRESS'=>'gzip -9f', 'SUFFIX' => 'gz',
'ZIP'=>'/usr/bin/zip', 'ZIPFLAGS'=>'-rl' },
(eval { ExtUtils::MakeMaker->VERSION(6.46) }
? (META_MERGE => {
resources => {
repository => 'http://github.com/rjbs/email-valid'
},
})
: ()
),
);
|