Skip Menu |
 

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 100347
Status: open
Priority: 0/
Queue: Encode

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

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

Attachments
0002-Silence-upcoming-duplicate-deprecation-warning.patch



Subject: [PATCH] Silence upcoming duplicate deprecation warning in encoding.pm
Download (untitled) / with headers
text/plain 176b
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
From: khw [...] cpan.org
Download (untitled) / with headers
text/plain 1.4k
On Fri Nov 14 15:55:36 2014, ilmari wrote: Show quoted text
> 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.
This patch has been overtaken by events, and should not be applied. I have just pushed to blead commit 3e669301f0a6fa34269f0e1eaf1fbbd72cae498a which avoids the changes this patch would have made to encoding.pm. My commit changes encoding to be lexically scoped (but STDIN and STDOUT encoding scope is unchanged). This should be soaked for a while to let the CPAN smokers see if it causes failures there; if so, it may have to be reverted. But in the meantime, any Encode release shouldn't include it. I'll issue a pull request when we have enough experience to think it will stick. I also revamped the pod in encoding.pm. I and several others were confused by it. As a native English speaker, I can (and hopefully did) write in more idiomatic English than what was there. And the changes that had been applied over the years introduced redundancies that I eliminated. Of course, improvement patches are welcome. To summarize, the mechanism in core Perl has now changed in regard to implementing the encoding pragma. This necessitates a few changes in encoding.pm, which mean that the patch for #100347 won't be needed in the long run, unless those changes have to be backed out because of CPAN smoke failures. We'll see in the next few weeks what is the case there.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.