use different mechanism for disabling some warnings
Graham Knop [Mon, 4 Aug 2014 09:40:24 +0000 (05:40 -0400)]
lib/strictures.pm
t/strictures.t

index 01ccd8c..1a96fcc 100644 (file)
@@ -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})) {
index 8312e71..b721a66 100644 (file)
@@ -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 }