]> iEval git - mafia.git/commitdiff
Tests require recent version of File::Spec::Functions
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 22 Apr 2017 11:01:06 +0000 (14:01 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 22 Apr 2017 11:01:06 +0000 (14:01 +0300)
Makefile.PL
t/examples.t

index e1dcb273b305e97c4065ea7d3d95e5678297e1e7..f2bca8ced1b6d81f4b771ab26e11619ebf6d7bb5 100644 (file)
@@ -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      => {
index 56423e76896351ee1b937a3734f82439682f6bfb..39af49a5e3f2b41a7fb3a7786eb0be0447e0bc0f 100644 (file)
@@ -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/'
This page took 0.02924 seconds and 4 git commands to generate.