Subject: | [PATCH] Silence upcoming duplicate deprecation warning in encoding.pm |
Perl 5.22 will deprecate assigning non-undef values to ${^ENCODING}, but 'use encoding' issues its own deprecation warning on 5.18 and later, so there's no need to warn twice.
Subject: | 0002-Silence-upcoming-duplicate-deprecation-warning.patch |
From 8d1bcf82b8336f9f16cd66b5cd0504b7d75cc5ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org>
Date: Fri, 14 Nov 2014 22:45:46 +0000
Subject: [PATCH 2/2] Silence upcoming duplicate deprecation warning
Perl 5.22 will deprecate assigning non-undef values to ${^ENCODING}, but
'use encoding' issues its own deprecation warning on 5.18 and later, so
there's no need to warn twice.
---
cpan/Encode/encoding.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/cpan/Encode/encoding.pm b/cpan/Encode/encoding.pm
index c0bff08..5253586 100644
--- a/cpan/Encode/encoding.pm
+++ b/cpan/Encode/encoding.pm
@@ -131,6 +131,7 @@ sub import {
$name = $enc->name; # canonize
unless ( $arg{Filter} ) {
DEBUG and warn "_exception($name) = ", _exception($name);
+ no warnings 'deprecated';
_exception($name) or ${^ENCODING} = $enc;
$HAS_PERLIO or return 1;
}
--
2.1.1