From: Graham Knop Date: Mon, 4 Aug 2014 09:40:24 +0000 (-0400) Subject: use different mechanism for disabling some warnings X-Git-Tag: v1.999_001~1^2~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2Fstrictures.git;a=commitdiff_plain;h=d50343b962ecab99ec40a0cfe99bb4ce9e510958 use different mechanism for disabling some warnings --- diff --git a/lib/strictures.pm b/lib/strictures.pm index 01ccd8c..1a96fcc 100644 --- a/lib/strictures.pm +++ b/lib/strictures.pm @@ -148,7 +148,8 @@ sub _enable_2 { strict->import; warnings->import; warnings->import(FATAL => @WARNING_CATEGORIES); - warnings->import(NONFATAL => @V2_NONFATAL); + warnings->unimport(FATAL => @V2_NONFATAL); + warnings->import(@V2_NONFATAL); warnings->unimport(@V2_DISABLE); if (_want_extra($opts->{file})) { diff --git a/t/strictures.t b/t/strictures.t index 8312e71..b721a66 100644 --- a/t/strictures.t +++ b/t/strictures.t @@ -35,7 +35,8 @@ sub test_hints { BEGIN { warnings->import('all'); warnings->import(FATAL => @strictures::WARNING_CATEGORIES); - warnings->import(NONFATAL => @strictures::V2_NONFATAL); + warnings->unimport(FATAL => @strictures::V2_NONFATAL); + warnings->import(@strictures::V2_NONFATAL); warnings->unimport(@strictures::V2_DISABLE); } BEGIN { capture_hints }