In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/919ec23b10e41ed5c6aaf77a8ae3d2f7ef279f1b?hp=c1cec775e9019cc8ae244d4db239a7ea5c0b343e>
- Log ----------------------------------------------------------------- commit 919ec23b10e41ed5c6aaf77a8ae3d2f7ef279f1b Author: Chris 'BinGOs' Williams <[email protected]> Date: Sun Dec 22 14:40:52 2013 +0000 Update Encode to CPAN version 2.56 [DELTA] $Revision: 2.55 $ $Date: 2013/09/14 07:51:59 $ ! Encode.pm t/Encode.t Merged RT#91569: [PATCH] decode_utf8 and non-PVs https://rt.cpan.org/Ticket/Display.html?id=91569 ----------------------------------------------------------------------- Summary of changes: Porting/Maintainers.pl | 2 +- cpan/Encode/Encode.pm | 4 ++-- cpan/Encode/t/Encode.t | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 02d75bd..8e21940 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -399,7 +399,7 @@ use File::Glob qw(:case); }, 'Encode' => { - 'DISTRIBUTION' => 'DANKOGAI/Encode-2.55.tar.gz', + 'DISTRIBUTION' => 'DANKOGAI/Encode-2.56.tar.gz', 'FILES' => q[cpan/Encode], }, diff --git a/cpan/Encode/Encode.pm b/cpan/Encode/Encode.pm index 033bb15..81ebb88 100644 --- a/cpan/Encode/Encode.pm +++ b/cpan/Encode/Encode.pm @@ -4,7 +4,7 @@ package Encode; use strict; use warnings; -our $VERSION = sprintf "%d.%02d", q$Revision: 2.55 $ =~ /(\d+)/g; +our $VERSION = sprintf "%d.%02d", q$Revision: 2.56 $ =~ /(\d+)/g; use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG}; use XSLoader (); XSLoader::load( __PACKAGE__, $VERSION ); @@ -209,7 +209,7 @@ my $utf8enc; sub decode_utf8($;$) { my ( $octets, $check ) = @_; return undef unless defined $octets; - $octets .= '' if ref $octets; + $octets .= ''; $check ||= 0; $utf8enc ||= find_encoding('utf8'); my $string = $utf8enc->decode( $octets, $check ); diff --git a/cpan/Encode/t/Encode.t b/cpan/Encode/t/Encode.t index 918975e..d490255 100644 --- a/cpan/Encode/t/Encode.t +++ b/cpan/Encode/t/Encode.t @@ -25,7 +25,7 @@ my @character_set = ('0'..'9', 'A'..'Z', 'a'..'z'); my @source = qw(ascii iso8859-1 cp1250); my @destiny = qw(cp1047 cp37 posix-bc); my @ebcdic_sets = qw(cp1047 cp37 posix-bc); -plan test => 38+$n*@encodings + 2*@source*@destiny*@character_set + 2*@ebcdic_sets*256 + 6 + 4; +plan test => 38+$n*@encodings + 2*@source*@destiny*@character_set + 2*@ebcdic_sets*256 + 6 + 5; my $str = join('',map(chr($_),0x20..0x7E)); my $cpy = $str; ok(length($str),from_to($cpy,'iso8859-1','Unicode'),"Length Wrong"); @@ -150,6 +150,10 @@ package main; ok(decode(latin1 => Encode::Dummy->new("foobar")), "foobar"); ok(encode(utf8 => Encode::Dummy->new("foobar")), "foobar"); +# RT#91569 +# decode_utf8 with non-string arguments +ok(decode_utf8(*1), "*main::1"); + # hash keys my $key = (keys %{{ "whatever\x{100}" => '' }})[0]; my $kopy = $key; -- Perl5 Master Repository
