This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Silence warnings in encoding::warnings
authorDavid Mitchell <davem@iabyn.com>
Mon, 23 Nov 2015 17:11:15 +0000 (17:11 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 23 Nov 2015 17:20:38 +0000 (17:20 +0000)
This is Karl's patch from

    https://rt.cpan.org/Public/Bug/Display.html?id=100538

which can be applied locally now that encoding::warnings has moved from
cpan/ to dist/.

dist/encoding-warnings/lib/encoding/warnings.pm

index 5e6aec0..d5c4184 100644 (file)
@@ -1,5 +1,5 @@
 package encoding::warnings;
-$encoding::warnings::VERSION = '0.11';
+$encoding::warnings::VERSION = '0.12';
 
 use strict;
 use 5.007;
@@ -170,7 +170,9 @@ sub import {
        ], $class,
     );
 
+    no warnings 'deprecated';
     ${^ENCODING} = $decoder;
+    use warnings 'deprecated';
     $^H{$class} = 1;
 }