r69838 - in /branches/upstream/libmime-charset-perl/current: Changes Charset.pm Charset/JA_JP.pod Charset/_Compat.pm META.yml Makefile.PL t/01encode.t t/01ooencode.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sun Feb 27 04:10:14 UTC 2011


Author: jawnsy-guest
Date: Sun Feb 27 04:10:02 2011
New Revision: 69838

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=69838
Log:
[svn-upgrade] new version libmime-charset-perl (1.008.1)

Modified:
    branches/upstream/libmime-charset-perl/current/Changes
    branches/upstream/libmime-charset-perl/current/Charset.pm
    branches/upstream/libmime-charset-perl/current/Charset/JA_JP.pod
    branches/upstream/libmime-charset-perl/current/Charset/_Compat.pm
    branches/upstream/libmime-charset-perl/current/META.yml
    branches/upstream/libmime-charset-perl/current/Makefile.PL
    branches/upstream/libmime-charset-perl/current/t/01encode.t
    branches/upstream/libmime-charset-perl/current/t/01ooencode.t

Modified: branches/upstream/libmime-charset-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmime-charset-perl/current/Changes?rev=69838&op=diff
==============================================================================
--- branches/upstream/libmime-charset-perl/current/Changes (original)
+++ branches/upstream/libmime-charset-perl/current/Changes Sun Feb 27 04:10:02 2011
@@ -1,3 +1,13 @@
+2011-02-19	Hatuka*nezumi - IKEDA Soji	<hatuka(at)nezumi.nu>
+
+	* Release 1.008.1.
+	* Chg: Workaround for CPAN RT #65796: Deep recursion error finding
+	  invalid charset.  Limit length of charset name upto 75.
+	* Imp: Supports Unicode/multibyte on Perl 5.7.3 (experimental).
+	* Perl 5.7.3 & 5.8.3:
+	  avoid ``Useless use of a constant in void context'' warnings.
+	* Doc: small fixes.
+
 2009-10-19	Hatuka*nezumi - IKEDA Soji	<hatuka(at)nezumi.nu>
 
 	* Release 1.008.

Modified: branches/upstream/libmime-charset-perl/current/Charset.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmime-charset-perl/current/Charset.pm?rev=69838&op=diff
==============================================================================
--- branches/upstream/libmime-charset-perl/current/Charset.pm (original)
+++ branches/upstream/libmime-charset-perl/current/Charset.pm Sun Feb 27 04:10:02 2011
@@ -109,12 +109,21 @@
 		);
 use Carp qw(croak);
 
-use constant USE_ENCODE => ($] >= 5.008)? 'Encode': '';
+use constant USE_ENCODE => ($] >= 5.007003)? 'Encode': '';
 
 my @ENCODE_SUBS = qw(FB_CROAK FB_PERLQQ FB_HTMLCREF FB_XMLCREF
 		     is_utf8 resolve_alias);
 if (USE_ENCODE) {
     eval "use ".USE_ENCODE." \@ENCODE_SUBS;";
+    if ($@) { # Perl 5.7.3 + Encode 0.40
+	eval "use ".USE_ENCODE." qw(is_utf8);";
+	require MIME::Charset::_Compat;
+	for my $sub (@ENCODE_SUBS) {
+	    no strict "refs";
+	    *{$sub} = \&{"MIME::Charset::_Compat::$sub"}
+		unless $sub eq 'is_utf8';
+	}
+    }
 } else {
     require MIME::Charset::_Compat;
     for my $sub (@ENCODE_SUBS) {
@@ -123,7 +132,7 @@
     }
 }
 
-$VERSION = '1.008';
+$VERSION = '1.008.1';
 
 ######## Private Attributes ########
 
@@ -344,6 +353,7 @@
     my $class = shift;
     my $charset = shift;
     return bless {}, $class unless $charset;
+    return bless {}, $class if 75 < length $charset; # w/a for CPAN RT #65796.
     my %params = @_;
     my $mapping = uc($params{'Mapping'} || $Config->{Mapping});
 
@@ -645,7 +655,7 @@
 =cut
 
 sub detect_7bit_charset($) {
-    return $DEFAULT_CHARSET unless USE_ENCODE;
+    return $DEFAULT_CHARSET unless &USE_ENCODE;
     my $s = shift;
     return $DEFAULT_CHARSET unless $s;
 
@@ -1096,7 +1106,7 @@
 
 Unicode/multibyte support flag.
 Non-empty string will be set when Unicode and multibyte support is enabled.
-Currently, this flag will be non-empty on Perl 5.8.0 or later and
+Currently, this flag will be non-empty on Perl 5.7.3 or later and
 empty string on earlier versions of Perl.
 
 =back
@@ -1166,7 +1176,7 @@
 
 =over 4
 
-=item o
+=item *
 
 new() method returns an object when CHARSET argument is not specified.
 
@@ -1176,7 +1186,7 @@
 
 =over 4
 
-=item o
+=item *
 
 Restrict characters in encoded-word according to RFC 2047 section 5 (3).
 This also affects return value of encoded_header_len() method.
@@ -1187,11 +1197,11 @@
 
 =over 4
 
-=item o
+=item *
 
 body_encoding() method may also returns C<"S">.
 
-=item o
+=item *
 
 Return value of body_encode() method for UTF-8 may include
 C<"QUOTED-PRINTABLE"> encoding item that in earlier versions was fixed to

Modified: branches/upstream/libmime-charset-perl/current/Charset/JA_JP.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmime-charset-perl/current/Charset/JA_JP.pod?rev=69838&op=diff
==============================================================================
--- branches/upstream/libmime-charset-perl/current/Charset/JA_JP.pod (original)
+++ branches/upstream/libmime-charset-perl/current/Charset/JA_JP.pod Sun Feb 27 04:10:02 2011
@@ -435,7 +435,7 @@
 
 Unicode/マルチバイト対応フラグ。
 Unicode とマルチバイトへの対応が有効になっているときは、空でない文字列が設定されている。
-現在、このフラグは Perl 5.8.0 以降で空でなく、それより以前の Perl では空の文字列。
+現在、このフラグは Perl 5.7.3 以降で空でなく、それより以前の Perl では空の文字列。
 
 =back
 
@@ -506,7 +506,7 @@
 
 =over 4
 
-=item o
+=item *
 
 new() メソッドは CHARSET 引数を指定しなくてもオブジェクトを返すようになった。
 
@@ -516,7 +516,7 @@
 
 =over 4
 
-=item o
+=item *
 
 encoded-word に含まれる文字種を RFC 2047 の 5 (3) 節のとおりにした。
 encoded_header_len() メソッドの返値も変わる。
@@ -527,11 +527,11 @@
 
 =over 4
 
-=item o
+=item *
 
 body_encoding() メソッドも C<"S"> を返せるようになった。
 
-=item o
+=item *
 
 body_encode() メソッドの UTF-8 に対する返値のエンコーディング要素は、
 これまでのリリースでは C<"BASE64"> に固定だったが、C<"QUOTED-PRINTABLE"> になることがある。

Modified: branches/upstream/libmime-charset-perl/current/Charset/_Compat.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmime-charset-perl/current/Charset/_Compat.pm?rev=69838&op=diff
==============================================================================
--- branches/upstream/libmime-charset-perl/current/Charset/_Compat.pm (original)
+++ branches/upstream/libmime-charset-perl/current/Charset/_Compat.pm Sun Feb 27 04:10:02 2011
@@ -7,7 +7,7 @@
 
 use vars qw($VERSION);
 
-$VERSION = "1.003";
+$VERSION = "1.003.1";
 
 sub FB_CROAK { 0x1; }
 sub FB_PERLQQ { 0x100; }
@@ -27,6 +27,8 @@
     my $cset = lc(shift);
     if ($cset eq "8bit" or $cset !~ /\S/) {
 	return undef;
+    } elsif ($cset eq '_unicode_') {
+	return $cset;
     } else {
 	# Taken from Encode-2.24.
 	my %Winlatin2cp = (

Modified: branches/upstream/libmime-charset-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmime-charset-perl/current/META.yml?rev=69838&op=diff
==============================================================================
--- branches/upstream/libmime-charset-perl/current/META.yml (original)
+++ branches/upstream/libmime-charset-perl/current/META.yml Sun Feb 27 04:10:02 2011
@@ -1,7 +1,7 @@
 --- #YAML:1.0
 name:         MIME-Charset
 abstract:     Charset Informations for MIME
-version:      1.008
+version:      1.008.1
 author:
   - Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>
 license:      perl
@@ -27,7 +27,7 @@
 provides:
     MIME::Charset:
         file:                      Charset.pm
-        version:                   1.008
+        version:                   1.008.1
 resources:
     repository: http://hatuka.nezumi.nu/repos/MIME-Charset/
 meta-spec:

Modified: branches/upstream/libmime-charset-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmime-charset-perl/current/Makefile.PL?rev=69838&op=diff
==============================================================================
--- branches/upstream/libmime-charset-perl/current/Makefile.PL (original)
+++ branches/upstream/libmime-charset-perl/current/Makefile.PL Sun Feb 27 04:10:02 2011
@@ -9,7 +9,7 @@
 
 # Specific dependencies
 test_requires 'Test::More' => '0';
-if ( $] >= 5.008 ) {
+if ( $] >= 5.007003 ) {
     requires 'Encode' => '1.98';
     include 'Module::AutoInstall';
     feature 'Extended mappings by Japanese codepages',

Modified: branches/upstream/libmime-charset-perl/current/t/01encode.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmime-charset-perl/current/t/01encode.t?rev=69838&op=diff
==============================================================================
--- branches/upstream/libmime-charset-perl/current/t/01encode.t (original)
+++ branches/upstream/libmime-charset-perl/current/t/01encode.t Sun Feb 27 04:10:02 2011
@@ -4,6 +4,10 @@
 BEGIN { plan tests => 18 }
 
 use MIME::Charset qw(:trans);
+if (&MIME::Charset::USE_ENCODE && $] < 5.008) {
+    require Encode::JP;
+    require Encode::CN;
+}
 
 my ($converted, $charset, $encoding);
 my $dst = "Perl:\033\$BIBE*\@^CoE*GQJ*=PNO4o\033(B";

Modified: branches/upstream/libmime-charset-perl/current/t/01ooencode.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmime-charset-perl/current/t/01ooencode.t?rev=69838&op=diff
==============================================================================
--- branches/upstream/libmime-charset-perl/current/t/01ooencode.t (original)
+++ branches/upstream/libmime-charset-perl/current/t/01ooencode.t Sun Feb 27 04:10:02 2011
@@ -4,6 +4,10 @@
 BEGIN { plan tests => 18 }
 
 use MIME::Charset qw(:trans);
+if (&MIME::Charset::USE_ENCODE && $] < 5.008) {
+    require Encode::JP;
+    require Encode::CN;
+}
 
 my ($converted, $charset, $encoding);
 my $dst = "Perl:\033\$BIBE*\@^CoE*GQJ*=PNO4o\033(B";




More information about the Pkg-perl-cvs-commits mailing list