Skip Menu |

This queue is for tickets about the encoding-warnings CPAN distribution.

Report information
The Basics
Id: 100538
Status: open
Priority: 0/
Queue: encoding-warnings

People
Owner: Nobody in particular
Requestors: khw [...] cpan.org
Cc:
AdminCc:

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



Subject: Setting ${^ENCODING} is now deprecated
Setting this variable is now deprecated and it is planned to remove it from a future Perl version. The attached patch just turns off the message for now. I'm not sure what the long term approach should be for this module. All of 'use encoding' is deprecated, and we plan to get rid of it as soon as we can get all the CPAN modules that use it to stop doing so. The advice in the pod of this module to use that pragma is hence now ill advised. People should be storing their files as UTF-8, and saying 'use utf8'.
Subject: 0001-Turn-off-deprecated-warning-msg.patch
From 21aa29e4f3cc207fd6497072c70b3056270a69eb Mon Sep 17 00:00:00 2001 From: Karl Williamson <khw@cpan.org> Date: Mon, 24 Nov 2014 15:07:00 -0700 Subject: [PATCH] Turn off deprecated warning msg --- cpan/encoding-warnings/lib/encoding/warnings.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpan/encoding-warnings/lib/encoding/warnings.pm b/cpan/encoding-warnings/lib/encoding/warnings.pm index 5e6aec0..5295d52 100644 --- a/cpan/encoding-warnings/lib/encoding/warnings.pm +++ b/cpan/encoding-warnings/lib/encoding/warnings.pm @@ -170,7 +170,9 @@ sub import { ], $class, ); + no warnings 'deprecated'; ${^ENCODING} = $decoder; + use warnings 'deprecated'; $^H{$class} = 1; } -- 1.9.1
On 2014-11-24 17:11:25, khw wrote: Show quoted text
> Setting this variable is now deprecated and it is planned to remove it > from a future Perl version.
In perl 5.25.x it is already removed: ... ${^ENCODING} is no longer supported at /tmpfs/.cpan-build-cpansand/2016090718/encoding-warnings-0.11-0/blib/lib/encoding/warnings.pm line 173. # Failed test 2 in t/1-warning.t at line 34 # t/1-warning.t line 34 is: ok($ok); t/1-warning.t .... Failed 1/2 subtests ... Show quoted text
> The attached patch just turns off the > message for now. > > I'm not sure what the long term approach should be for this module. > All of 'use encoding' is deprecated, and we plan to get rid of it as > soon as we can get all the CPAN modules that use it to stop doing so. > The advice in the pod of this module to use that pragma is hence now > ill advised. People should be storing their files as UTF-8, and > saying 'use utf8'.
On Wed Sep 07 16:43:25 2016, SREZIC wrote: Show quoted text
> On 2014-11-24 17:11:25, khw wrote:
> > Setting this variable is now deprecated and it is planned to remove > > it > > from a future Perl version.
> > In perl 5.25.x it is already removed: > > ... > ${^ENCODING} is no longer supported at /tmpfs/.cpan-build- > cpansand/2016090718/encoding-warnings-0.11- > 0/blib/lib/encoding/warnings.pm line 173. > # Failed test 2 in t/1-warning.t at line 34 > # t/1-warning.t line 34 is: ok($ok); > t/1-warning.t .... > Failed 1/2 subtests > ...
Blead is upstream for this module. The blead version does not die with that message, but warns and then does nothing. It needs a new CPAN release.