Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 69735
Status: resolved
Priority: 0/
Queue: Encode

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

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

Attachments


Subject: patch for use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG};
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1311510626-12441-83"
Content-Length: 0
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 151
Download (untitled) / with headers
text/plain 151b
Hi. setting env var PERL_ENCODE_DEBUG is faster than editing 1-6 files so here is a patch for use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG}; thanks
Subject: Encode-2.43-debug.patch.txt
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"; name="Encode-2.43-debug.patch.txt"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename="Encode-2.43-debug.patch.txt"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: ascii
Content-Length: 2334
diff -ruN Encode-2.43-orig/Encode.pm Encode-2.43/Encode.pm --- Encode-2.43-orig/Encode.pm 2011-05-21 16:14:46.000000000 -0700 +++ Encode-2.43/Encode.pm 2011-07-24 04:50:38.187500000 -0700 @@ -5,7 +5,7 @@ use strict; use warnings; our $VERSION = sprintf "%d.%02d", q$Revision: 2.43 $ =~ /(\d+)/g; -sub DEBUG () { 0 } +use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG}; use XSLoader (); XSLoader::load( __PACKAGE__, $VERSION ); diff -ruN Encode-2.43-orig/encoding.pm Encode-2.43/encoding.pm --- Encode-2.43-orig/encoding.pm 2011-05-21 16:14:45.000000000 -0700 +++ Encode-2.43/encoding.pm 2011-07-24 04:50:38.203125000 -0700 @@ -6,7 +6,7 @@ use strict; use warnings; -sub DEBUG () { 0 } +use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG}; BEGIN { if ( ord("A") == 193 ) { diff -ruN Encode-2.43-orig/lib/Encode/Alias.pm Encode-2.43/lib/Encode/Alias.pm --- Encode-2.43-orig/lib/Encode/Alias.pm 2011-05-21 16:14:48.000000000 -0700 +++ Encode-2.43/lib/Encode/Alias.pm 2011-07-24 04:50:38.218750000 -0700 @@ -3,7 +3,7 @@ use warnings; no warnings 'redefine'; our $VERSION = do { my @r = ( q$Revision: 2.14 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; -sub DEBUG () { 0 } +use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG}; use base qw(Exporter); diff -ruN Encode-2.43-orig/lib/Encode/Encoder.pm Encode-2.43/lib/Encode/Encoder.pm --- Encode-2.43-orig/lib/Encode/Encoder.pm 2011-05-21 16:14:48.000000000 -0700 +++ Encode-2.43/lib/Encode/Encoder.pm 2011-07-24 04:50:38.218750000 -0700 @@ -11,7 +11,7 @@ our @EXPORT_OK = qw ( encoder ); our $AUTOLOAD; -sub DEBUG () { 0 } +use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG}; use Encode qw(encode decode find_encoding from_to); use Carp; diff -ruN Encode-2.43-orig/lib/Encode/Guess.pm Encode-2.43/lib/Encode/Guess.pm --- Encode-2.43-orig/lib/Encode/Guess.pm 2011-05-21 16:14:45.000000000 -0700 +++ Encode-2.43/lib/Encode/Guess.pm 2011-07-24 04:50:38.296875000 -0700 @@ -5,7 +5,7 @@ our $VERSION = do { my @r = ( q$Revision: 2.4 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; my $Canon = 'Guess'; -sub DEBUG () { 0 } +use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG}; our %DEF_SUSPECTS = map { $_ => find_encoding($_) } qw(ascii utf8); $Encode::Encoding{$Canon} = bless { Name => $Canon,
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-22517-1312875314-743.69735-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 278
Download (untitled) / with headers
text/plain 278b
Your patch is in the next version. Thx! Dan the Encode Maintainer On Sun Jul 24 08:30:26 2011, noreply wrote: Show quoted text
> Hi. > setting env var PERL_ENCODE_DEBUG is faster than editing 1-6 files > so here is a patch for > use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG}; > > thanks


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.