From 76b9203782f6861f881a189e3fcfa6d55128eca1 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 15 Aug 2015 23:10:15 +0300 Subject: [PATCH] Reduce Perl dependency to 5.10.1 --- Makefile.PL | 2 +- lib/Mafia.pm | 2 +- t/examples.t | 12 +++++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 2ff875d..f78c218 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -6,7 +6,7 @@ WriteMakefile( VERSION_FROM => 'lib/Mafia.pm', ABSTRACT_FROM => 'lib/Mafia.pm', AUTHOR => 'Marius Gavrilescu ', - MIN_PERL_VERSION => '5.14.0', + MIN_PERL_VERSION => '5.10.1', LICENSE => 'perl', SIGN => 1, META_MERGE => { diff --git a/lib/Mafia.pm b/lib/Mafia.pm index 40eeaba..7785546 100644 --- a/lib/Mafia.pm +++ b/lib/Mafia.pm @@ -1,6 +1,6 @@ package Mafia; -use 5.014000; +use 5.010001; use strict; use warnings; use parent qw/Exporter/; diff --git a/t/examples.t b/t/examples.t index 63efb10..977cd6e 100644 --- a/t/examples.t +++ b/t/examples.t @@ -1,13 +1,14 @@ #!/usr/bin/perl -use 5.014000; +use 5.010001; +use strict; use warnings; use IO::Handle; -use Mafia; my @examples; -BEGIN { @examples = map { s/\.pl//r } glob 't/examples/*.pl' }; -use Test::More tests => scalar @examples; +BEGIN { @examples = glob 't/examples/*.pl' }; +use Test::More tests => 1 + @examples; +BEGIN { use_ok('Mafia') } for my $example (@examples) { my $out; @@ -15,7 +16,8 @@ for my $example (@examples) { open STDOUT, '>', \$out; clean; + do $example; + $example =~ s/\.pl$//; my $ok = join '', IO::File->new("$example.out", '<')->getlines; - do "$example.pl"; is $out, $ok, substr $example, length 't/examples/' } -- 2.39.2