From 78e7a0594cc773f3af79a430d248116d388ba43d Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 22 Apr 2017 14:01:06 +0300 Subject: [PATCH] Tests require recent version of File::Spec::Functions --- Makefile.PL | 10 +++++++++- t/examples.t | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index e1dcb27..f2bca8c 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,6 +1,8 @@ -use 5.014000; +use 5.010001; use ExtUtils::MakeMaker; +my $has_tr = $ExtUtils::MakeMaker::VERSION >= 6.64; + WriteMakefile( NAME => 'Mafia', VERSION_FROM => 'lib/Mafia.pm', @@ -9,6 +11,12 @@ WriteMakefile( MIN_PERL_VERSION => '5.10.1', LICENSE => 'perl', SIGN => 1, + (TEST_REQUIRES => { + qw/File::Spec::Functions 3.62/, + }) x $has_tr, + (PREREQ_PM => { + qw/File::Spec::Functions 3.62/, + }) x !$has_tr, META_MERGE => { dynamic_config => 0, resources => { diff --git a/t/examples.t b/t/examples.t index 56423e7..39af49a 100644 --- a/t/examples.t +++ b/t/examples.t @@ -17,7 +17,7 @@ for my $example (@examples) { open STDOUT, '>', \$out; clean; - do rel2abs $example; + do(rel2abs($example)); $example =~ s/\.pl$//; my $ok = join '', IO::File->new("$example.out", '<')->getlines; is $out, $ok, substr $example, length 't/examples/' -- 2.39.2