From: Karen Etheridge Date: Tue, 22 Dec 2015 00:34:13 +0000 (-0800) Subject: update tooling to avoid detecting the optional use of perl 5.010 X-Git-Tag: v0.25~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b715d61b09bc1f4e674ddd9fc239ad7768663c63;p=p5sagit%2FTry-Tiny.git update tooling to avoid detecting the optional use of perl 5.010 --- diff --git a/dist.ini b/dist.ini index 1c41018..5d0e596 100644 --- a/dist.ini +++ b/dist.ini @@ -5,27 +5,27 @@ license = MIT copyright_holder = יובל קוג'מן (Yuval Kogman) copyright_year = 2009 +[FileFinder::Filter / all_files_but_using_5.10_features] +finder = :TestFiles +skip = t/given_when.t +skip = t/when.t + [@Author::ETHER] installer = MakeMaker Authority.authority = cpan:NUFFIN ; tests optionally require 5.010 -AutoPrereqs.skip[0] = ^perl$ -; tests for optional Sub::Name stuff -AutoPrereqs.skip[1] = ^Sub::Name$ -AutoPrereqs.skip[2] = ^Sub::Util$ -; tests optionally require Capture::Tiny -AutoPrereqs.skip[3] = ^Capture::Tiny$ --remove = Test::MinimumVersion ; t/given_when.t implies needing 5.010 +AutoPrereqs.skip = ^perl$ +MinimumPerl.test_finder = all_files_but_using_5.10_features -remove = Test::CleanNamespaces -[RemovePrereqs] -remove = perl ; 5.010 prereq found in t/*when.t - -[Prereqs] -perl = 5.006 - -[Prereqs / TestRecommends] -Capture::Tiny = 0.12 ; capture_stderr +; TODO: make this an option of [Test::MinimumVersion] +[Substitute] +file = xt/release/minimum-version.t +code = s/^(all_minimum_version_ok\([^)]+)(\s*\);)/$1, { skip => [qw(t\/given_when\.t t\/when\.t)] }$2/ -[Prereqs / TestSuggests] -Sub::Util = 0 +[Prereqs::Soften] +to_relationship = suggests +copy_to = develop.requires +module = Capture::Tiny ; capture_stderr +module = Sub::Name +module = Sub::Util diff --git a/t/given_when.t b/t/given_when.t index afa0733..1e690d7 100644 --- a/t/given_when.t +++ b/t/given_when.t @@ -6,7 +6,7 @@ use warnings; use Test::More; BEGIN { - plan skip_all => "Perl 5.10 is required" unless eval { require 5.010 }; + plan skip_all => 'Perl 5.010 is required' unless "$]" >= '5.010'; plan tests => 2; } diff --git a/t/when.t b/t/when.t index 54fd678..4662d25 100644 --- a/t/when.t +++ b/t/when.t @@ -6,7 +6,7 @@ use warnings; use Test::More; BEGIN { - plan skip_all => "Perl 5.10 required" unless eval { require 5.010; 1 }; + plan skip_all => 'Perl 5.010 is required' unless "$]" >= '5.010'; plan tests => 5; }