Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the MooseX-App CPAN distribution.

Report information
The Basics
Id: 85429
Status: resolved
Priority: 0/
Queue: MooseX-App

People
Owner: Nobody in particular
Requestors: mike [...] mikedoherty.ca
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.26
Fixed in: (no value)



CC: Mike Doherty <doherty [...] cs.dal.ca>
Subject: [PATCH] Silence experimental::smartmatch warnings
Date: Sat, 18 May 2013 20:08:23 -0300
To: bug-MooseX-App [...] rt.cpan.org
From: mike [...] mikedoherty.ca
From: Mike Doherty <doherty@cs.dal.ca> We know smartmatch is experimental, and we accept the risk of using it. This fixes spurious test failures like RT #84986. --- lib/MooseX/App/Exporter.pm | 1 + lib/MooseX/App/Message/BlockColor.pm | 1 + lib/MooseX/App/Meta/Role/Class/Base.pm | 1 + lib/MooseX/App/ParsedArgv.pm | 1 + lib/MooseX/App/ParsedArgv/Element.pm | 1 + lib/MooseX/App/Utils.pm | 1 + 6 files changed, 6 insertions(+) diff --git a/lib/MooseX/App/Exporter.pm b/lib/MooseX/App/Exporter.pm index 8423be4..c8c824c 100644 --- a/lib/MooseX/App/Exporter.pm +++ b/lib/MooseX/App/Exporter.pm @@ -10,6 +10,7 @@ use warnings; use Moose::Exporter; use MooseX::App::Utils; use MooseX::App::ParsedArgv; +no if $] >= 5.018000, warnings => qw(experimental::smartmatch); our %PLUGIN_SPEC; diff --git a/lib/MooseX/App/Message/BlockColor.pm b/lib/MooseX/App/Message/BlockColor.pm index 130a05d..61593a1 100644 --- a/lib/MooseX/App/Message/BlockColor.pm +++ b/lib/MooseX/App/Message/BlockColor.pm @@ -8,6 +8,7 @@ use utf8; use namespace::autoclean; use Moose; extends qw(MooseX::App::Message::Block); +no if $] >= 5.018000, warnings => qw(experimental::smartmatch); use Term::ANSIColor qw(); use IO::Interactive qw(is_interactive); diff --git a/lib/MooseX/App/Meta/Role/Class/Base.pm b/lib/MooseX/App/Meta/Role/Class/Base.pm index da8e066..23efc75 100644 --- a/lib/MooseX/App/Meta/Role/Class/Base.pm +++ b/lib/MooseX/App/Meta/Role/Class/Base.pm @@ -12,6 +12,7 @@ use MooseX::App::Utils; use Path::Class; use Module::Pluggable::Object; use List::Util qw(max); +no if $] >= 5.018000, warnings => qw(experimental::smartmatch); has 'app_messageclass' => ( is => 'rw', diff --git a/lib/MooseX/App/ParsedArgv.pm b/lib/MooseX/App/ParsedArgv.pm index 98afcd1..764ca50 100644 --- a/lib/MooseX/App/ParsedArgv.pm +++ b/lib/MooseX/App/ParsedArgv.pm @@ -9,6 +9,7 @@ use Moose; use Encode qw(decode); use MooseX::App::ParsedArgv::Element; +no if $] >= 5.018000, warnings => qw(experimental::smartmatch); my $SINGLETON; diff --git a/lib/MooseX/App/ParsedArgv/Element.pm b/lib/MooseX/App/ParsedArgv/Element.pm index 8950d49..2da263a 100644 --- a/lib/MooseX/App/ParsedArgv/Element.pm +++ b/lib/MooseX/App/ParsedArgv/Element.pm @@ -6,6 +6,7 @@ use 5.010; use utf8; use Moose; +no if $] >= 5.018000, warnings => qw(experimental::smartmatch); has 'key' => ( is => 'ro', diff --git a/lib/MooseX/App/Utils.pm b/lib/MooseX/App/Utils.pm index 980543b..f2258d8 100644 --- a/lib/MooseX/App/Utils.pm +++ b/lib/MooseX/App/Utils.pm @@ -4,6 +4,7 @@ use 5.010; use utf8; use strict; use warnings; +no if $] >= 5.018000, warnings => qw/ experimental::smartmatch /; use List::Util qw(max); -- 1.8.2.3
Fixed in 1.22
This is broken again in at least 1.26, in lib/MooseX/App/Utils.pm Moving the "no if ..." after the (new) "use Moose::Util::TypeConstraints;" helps. Patch attached. Cheers, gregor, Debian Perl Group
Subject: experimental-smartmatch.patch
--- a/lib/MooseX/App/Utils.pm +++ b/lib/MooseX/App/Utils.pm @@ -4,7 +4,6 @@ use utf8; use strict; use warnings; -no if $] >= 5.018000, warnings => qw/ experimental::smartmatch /; use List::Util qw(max); @@ -12,6 +11,7 @@ our $INDENT = 4; use Moose::Util::TypeConstraints; +no if $] >= 5.018000, warnings => qw/ experimental::smartmatch /; subtype 'MooseX::App::Types::List' => as 'ArrayRef';
Fixed in 1.27 Thank you Maroš