From 1b23b0872b58ec9630f58f13ce9b598cced60a93 Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Thu, 6 Mar 2014 13:44:13 -0800 Subject: [PATCH] Remove 'use experimental', it doesn't work with 5.8. Alas, "use experimental" 0.006 added a requirement for 5.10. Use the equivalent "use if, no warnings" statement instead. Might be a better long term fix, but this gets Travis working again on 5.8 and that's more important. --- Build.PL | 1 - META.json | 7 ++----- META.yml | 5 +++-- lib/Method/Signatures.pm | 2 +- t/where.t | 2 +- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Build.PL b/Build.PL index a54d9c7..3cb595c 100755 --- a/Build.PL +++ b/Build.PL @@ -25,7 +25,6 @@ my $build = Module::Build->new( requires => { 'perl' => '5.8.1', - 'experimental' => '0.005', 'Devel::Declare' => '0.006002', 'Devel::Declare::MethodInstaller::Simple' => '0.006002', 'Const::Fast' => '0.006', diff --git a/META.json b/META.json index b8f2ed2..97d6b87 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Michael G Schwern " ], "dynamic_config" : 1, - "generated_by" : "Module::Build version 0.4005, CPAN::Meta::Converter version 2.131560", + "generated_by" : "Module::Build version 0.4203", "license" : [ "perl_5" ], @@ -42,7 +42,6 @@ "Mouse" : "0.64", "PPI" : "1.203", "Sub::Name" : "0.03", - "experimental" : "0.005", "perl" : "v5.8.1" } } @@ -68,9 +67,7 @@ "bugtracker" : { "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Method-Signatures" }, - "license" : [ - "http://dev.perl.org/licenses/" - ], + "license" : "http://dev.perl.org/licenses/", "repository" : { "url" : "https://github.com/schwern/method-signatures" } diff --git a/META.yml b/META.yml index cebe98d..2dfd785 100644 --- a/META.yml +++ b/META.yml @@ -11,7 +11,7 @@ build_requires: configure_requires: Module::Build: 0.26 dynamic_config: 1 -generated_by: 'Module::Build version 0.4005, CPAN::Meta::Converter version 2.131560' +generated_by: 'Module::Build version 0.4203, CPAN::Meta::Converter version 2.120921' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -26,8 +26,10 @@ provides: version: 20140224 Method::Signatures::Parameter: file: lib/Method/Signatures/Parameter.pm + version: 0 Method::Signatures::Parser: file: lib/Method/Signatures/Parser.pm + version: 0 recommends: Data::Alias: 1.08 Moose: 0.96 @@ -40,7 +42,6 @@ requires: Mouse: 0.64 PPI: 1.203 Sub::Name: 0.03 - experimental: 0.005 perl: v5.8.1 resources: bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Method-Signatures diff --git a/lib/Method/Signatures.pm b/lib/Method/Signatures.pm index 8de221e..32b40f6 100644 --- a/lib/Method/Signatures.pm +++ b/lib/Method/Signatures.pm @@ -1151,7 +1151,7 @@ sub inject_for_sig { ? "sub $constraint" : $constraint; my $error = sprintf q{ %s->where_error(%s, '%s', '%s') }, $class, $var, $var, $constraint; - push @code, "$error unless do { use experimental 'smartmatch'; grep { \$_ ~~ $constraint_impl } $var }; "; + push @code, "$error unless do { no if \$] >= 5.017011, warnings => 'experimental::smartmatch'; grep { \$_ ~~ $constraint_impl } $var }; "; } } diff --git a/t/where.t b/t/where.t index 74aa851..26cec2b 100644 --- a/t/where.t +++ b/t/where.t @@ -108,7 +108,7 @@ subtest 'where { cat => 1, dog => 2}' => sub { subtest 'where where where' => sub { - use experimental 'smartmatch'; + no if $] >= 5.017011, warnings => 'experimental::smartmatch'; plan tests => 14; func is_prime ($x) {