r15120 - in /branches/upstream/libi18n-charset-perl/current: ./ inc/Module/ inc/Module/Install/ lib/I18N/ lib/I18N/Charset/ t/

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Mon Feb 18 20:48:04 UTC 2008


Author: gregoa-guest
Date: Mon Feb 18 20:48:03 2008
New Revision: 15120

URL: http://svn.debian.org/wsvn/?sc=1&rev=15120
Log:
[svn-upgrade] Integrating new upstream version, libi18n-charset-perl (1.387)

Added:
    branches/upstream/libi18n-charset-perl/current/t/rt33087.t   (with props)
Removed:
    branches/upstream/libi18n-charset-perl/current/lib/I18N/Charset/
Modified:
    branches/upstream/libi18n-charset-perl/current/Changes
    branches/upstream/libi18n-charset-perl/current/MANIFEST
    branches/upstream/libi18n-charset-perl/current/META.yml
    branches/upstream/libi18n-charset-perl/current/Makefile.PL
    branches/upstream/libi18n-charset-perl/current/inc/Module/Install.pm
    branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Base.pm
    branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Can.pm
    branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Fetch.pm
    branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Makefile.pm
    branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Metadata.pm
    branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Win32.pm
    branches/upstream/libi18n-charset-perl/current/inc/Module/Install/WriteAll.pm
    branches/upstream/libi18n-charset-perl/current/lib/I18N/Charset.pm
    branches/upstream/libi18n-charset-perl/current/t/libi.t
    branches/upstream/libi18n-charset-perl/current/t/pod-coverage.t

Modified: branches/upstream/libi18n-charset-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/Changes?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/Changes (original)
+++ branches/upstream/libi18n-charset-perl/current/Changes Mon Feb 18 20:48:03 2008
@@ -1,3 +1,7 @@
+2008-02-15    <Daddy at C-3PO>
+
+	* lib/I18N/Charset.pm: initialize also from Unicode::Map8 .bin files
+
 2007-05-18    <Daddy at C-3PO>
 
 	* lib/I18N/Charset.pm (mib_charset_name): added pod

Modified: branches/upstream/libi18n-charset-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/MANIFEST?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/MANIFEST (original)
+++ branches/upstream/libi18n-charset-perl/current/MANIFEST Mon Feb 18 20:48:03 2008
@@ -8,7 +8,6 @@
 inc/Module/Install/Win32.pm
 inc/Module/Install/WriteAll.pm
 lib/I18N/Charset.pm
-lib/I18N/Charset/character-sets
 Makefile.PL
 MANIFEST			This list of files
 META.yml
@@ -22,5 +21,6 @@
 t/mime.t
 t/pod-coverage.t
 t/pod.t
+t/rt33087.t
 t/umap.t
 t/utf8.t

Modified: branches/upstream/libi18n-charset-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/META.yml?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/META.yml (original)
+++ branches/upstream/libi18n-charset-perl/current/META.yml Mon Feb 18 20:48:03 2008
@@ -1,10 +1,11 @@
 --- 
-author: Martin Thurn <mthurn at cpan.org>
+author: 
+  - Martin Thurn <mthurn at cpan.org>
 build_requires: 
   IO::Capture::Stderr: 0
   Test::More: 0
 distribution_type: module
-generated_by: Module::Install version 0.67
+generated_by: Module::Install version 0.68
 license: perl
 meta-spec: 
   url: http://module-build.sourceforge.net/META-spec-v1.3.html
@@ -17,10 +18,13 @@
 recommends: 
   App::Info::Lib::Iconv: 0
   Encode: 0
+  Jcode: 0
+  Test::Pod: 0
+  Test::Pod::Coverage: 0
   Unicode::Map: 0
   Unicode::Map8: 0
   Unicode::MapUTF8: 0
 requires: 
   IO::String: 0
   perl: 5.004
-version: 1.385
+version: 1.387

Modified: branches/upstream/libi18n-charset-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/Makefile.PL?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/Makefile.PL (original)
+++ branches/upstream/libi18n-charset-perl/current/Makefile.PL Mon Feb 18 20:48:03 2008
@@ -1,5 +1,5 @@
 
-# $Id: Makefile.PL,v 1.14 2005/11/13 03:02:31 Daddy Exp $
+# $Id: Makefile.PL,v 1.15 2007/11/24 03:10:48 Daddy Exp $
 
 use inc::Module::Install;
 
@@ -14,11 +14,14 @@
 recommends('Encode');
 build_requires('IO::Capture::Stderr' => 0);
 requires('IO::String');
+recommends('Jcode');
 recommends('Unicode::Map');
 recommends('Unicode::Map8');
 recommends('Unicode::MapUTF8');
 # Test::More is needed for `make test`:
 build_requires('Test::More');
+recommends('Test::Pod');
+recommends('Test::Pod::Coverage');
 
 &WriteAll;
 

Modified: branches/upstream/libi18n-charset-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/inc/Module/Install.pm?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libi18n-charset-perl/current/inc/Module/Install.pm Mon Feb 18 20:48:03 2008
@@ -28,7 +28,7 @@
     # This is not enforced yet, but will be some time in the next few
     # releases once we can make sure it won't clash with custom
     # Module::Install extensions.
-    $VERSION = '0.67';
+    $VERSION = '0.68';
 }
 
 # Whether or not inc::Module::Install is actually loaded, the

Modified: branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Base.pm?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Base.pm Mon Feb 18 20:48:03 2008
@@ -1,7 +1,7 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.67';
+$VERSION = '0.68';
 
 # Suspend handler for "redefined" warnings
 BEGIN {

Modified: branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Can.pm?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Can.pm Mon Feb 18 20:48:03 2008
@@ -11,7 +11,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Fetch.pm?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Fetch.pm Mon Feb 18 20:48:03 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Makefile.pm?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Makefile.pm Mon Feb 18 20:48:03 2008
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Metadata.pm?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Metadata.pm Mon Feb 18 20:48:03 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Win32.pm?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/libi18n-charset-perl/current/inc/Module/Install/Win32.pm Mon Feb 18 20:48:03 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libi18n-charset-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/inc/Module/Install/WriteAll.pm?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/libi18n-charset-perl/current/inc/Module/Install/WriteAll.pm Mon Feb 18 20:48:03 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.67';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: branches/upstream/libi18n-charset-perl/current/lib/I18N/Charset.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/lib/I18N/Charset.pm?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/lib/I18N/Charset.pm (original)
+++ branches/upstream/libi18n-charset-perl/current/lib/I18N/Charset.pm Mon Feb 18 20:48:03 2008
@@ -1,16 +1,17 @@
 
-# $rcs = ' $Id: Charset.pm,v 1.385 2007/05/17 23:58:14 Daddy Exp $ ' ;
+# $rcs = ' $Id: Charset.pm,v 1.387 2008/02/16 18:59:04 Daddy Exp $ ' ;
 
 package I18N::Charset;
 
+use strict;
+use warnings;
+
 require 5.002;
 
-require Exporter;
+use Exporter;
+use base 'Exporter';
 use Carp;
 use IO::String;
-
-# Don't leave home without it:
-use strict;
 
 =head1 NAME
 
@@ -67,10 +68,9 @@
 #-----------------------------------------------------------------------
 #	Public Global Variables
 #-----------------------------------------------------------------------
-use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK );
-$VERSION = do { my @r = (q$Revision: 1.385 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r };
- at ISA       = qw( Exporter );
- at EXPORT    = qw( iana_charset_name
+our
+$VERSION = do { my @r = (q$Revision: 1.387 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r };
+our @EXPORT = qw( iana_charset_name
 map8_charset_name
 umap_charset_name
 umu8_charset_name
@@ -80,7 +80,7 @@
 enco_charset_name
 mib_to_charset_name charset_name_to_mib
  );
- at EXPORT_OK = qw( add_iana_alias add_map8_alias add_umap_alias add_libi_alias add_enco_alias );
+our @EXPORT_OK = qw( add_iana_alias add_map8_alias add_umap_alias add_libi_alias add_enco_alias );
 
 #-----------------------------------------------------------------------
 #	Private Global Variables
@@ -466,10 +466,12 @@
 
 This function takes a string containing the name of a character set
 (in almost any format) and returns a string which contains a name for
-the character set that can be passed to Unicode::Map8::new(). If no
-valid character set name can be identified, then C<undef> will be
-returned.  The case and punctuation within the argument string are not
-important.
+the character set that can be passed to Unicode::Map8::new().
+Note: the returned string will be capitalized just like
+the name of the .bin file in the Unicode::Map8::MAPS_DIR directory.
+If no valid character set name can be identified,
+then C<undef> will be returned.
+The case and punctuation within the argument string are not important.
 
     $sCharset = map8_charset_name('windows-1251');
 
@@ -494,6 +496,7 @@
   # print STDERR "undef\n" if $iDebug;
   return undef;
   } # map8_charset_name
+
 
 =item umap_charset_name()
 
@@ -986,8 +989,9 @@
   if (eval "require Unicode::Map8")
     {
     # $iDebug = 1;
-    print STDERR " + found Unicode::Map8 installed, will build map8 tables..." if $iDebug;
-    my $sMapFile = "$Unicode::Map8::MAPS_DIR/aliases";
+    my $sDir = $Unicode::Map8::MAPS_DIR;
+    my $sMapFile = "$sDir/aliases";
+    print STDERR " + found Unicode::Map8 installed, will build map8 tables based on $sMapFile...\n" if $iDebug;
     if (open MAPS, $sMapFile)
       {
       while (defined (my $sLine = <MAPS>))
@@ -1034,11 +1038,47 @@
           } # foreach
         # $iDebug = 0;
         } # while
-      close MAPS;
+      close MAPS or warn;
       } # if open
     else
       {
       carp " --- couldn't open $sMapFile for read" if $iDebug;
+      }
+    print STDERR " + found Unicode::Map8 installed, will build map8 tables based on .bin files in $sDir...\n" if $iDebug;
+    if (opendir MAPSDIR, $sDir)
+      {
+    MAP8_FILE:
+      while (my $sFname = readdir MAPSDIR)
+        {
+        next MAP8_FILE if ($sFname !~ s/.bin$//);
+        my $sIANA = '';
+        my $iMIB;
+        if (defined (my $sTemp = &iana_charset_name($sFname)))
+          {
+          $sIANA = $sTemp;
+          } # if
+        if ($sIANA eq '')
+          {
+          # $iDebug = 1;
+          $iMIB = $sFakeMIB++;
+          print STDERR " +   had to use a dummy mib ($iMIB) for Map8 entry=$sFname=\n" if $iDebug;
+          $hsMIBofLongname{$sFname} = $iMIB;
+          } # unless
+        else
+          {
+          $iMIB = $hsMIBofLongname{$sIANA};
+          print STDERR " +   found IANA name $sIANA ($iMIB) for Map8 entry=$sFname=\n" if $iDebug;
+          }
+        # $iDebug = ($iMIB =~ m!225[23]!);
+        # Make this IANA mib map to this Map8 name:
+        print STDERR " +      map $iMIB to $sFname in MIBtoMAP8...\n" if $iDebug;
+        $MIBtoMAP8{$iMIB} = $sFname;
+        } # while MAP8_FILE
+      closedir MAPSDIR or warn;
+      }
+    else
+      {
+      carp " --- couldn't open $sDir for read: $!" if $iDebug;
       }
     # If there are special cases for Unicode::Map8, add them here:
     # &add_map8_alias("new-name", "existing-name");

Modified: branches/upstream/libi18n-charset-perl/current/t/libi.t
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/t/libi.t?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/t/libi.t (original)
+++ branches/upstream/libi18n-charset-perl/current/t/libi.t Mon Feb 18 20:48:03 2008
@@ -38,7 +38,7 @@
       {
       skip 'iconv is not installed', 16 unless $oAILI->installed;
       my $iLibiVersion = $oAILI->version || 0.0;
-      # print STDERR " + libiconv version is $iLibiVersion\n";
+      diag "libiconv version is $iLibiVersion\n";
  SKIP:
         {
         skip 'iconv version is too old(?)', 16 if ($iLibiVersion < 1.8);

Modified: branches/upstream/libi18n-charset-perl/current/t/pod-coverage.t
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/t/pod-coverage.t?rev=15120&op=diff
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/t/pod-coverage.t (original)
+++ branches/upstream/libi18n-charset-perl/current/t/pod-coverage.t Mon Feb 18 20:48:03 2008
@@ -1,7 +1,7 @@
-# $Id: pod-coverage.t,v 1.2 2007/05/17 23:53:34 Daddy Exp $
+# $Id: pod-coverage.t,v 1.1 2008/02/15 23:16:45 Daddy Exp $
 use Test::More;
 my
-$VERSION = do { my @r = (q$Revision: 1.2 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r };
+$VERSION = do { my @r = (q$Revision: 1.1 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r };
 eval "use Test::Pod::Coverage 1.00";
 plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@;
 all_pod_coverage_ok();

Added: branches/upstream/libi18n-charset-perl/current/t/rt33087.t
URL: http://svn.debian.org/wsvn/branches/upstream/libi18n-charset-perl/current/t/rt33087.t?rev=15120&op=file
==============================================================================
--- branches/upstream/libi18n-charset-perl/current/t/rt33087.t (added)
+++ branches/upstream/libi18n-charset-perl/current/t/rt33087.t Mon Feb 18 20:48:03 2008
@@ -1,0 +1,17 @@
+
+# $Id: rt33087.t,v 1.1 2008/02/15 23:16:45 Daddy Exp $
+
+use blib;
+use Test::More;
+unless (eval "require Unicode::Map8")
+  {
+  plan skip_all => 'Unicode::Map8 is not installed';
+  } # unless
+plan tests => 2;
+&use_ok('I18N::Charset', qw( iana_charset_name map8_charset_name ));
+
+is(iana_charset_name("koi8-r"), 'KOI8-R', 'iana literal koi8-r');
+is(map8_charset_name("Koi 8 R"), 'koi8-r', 'map8 literal koi8-r');
+
+__END__
+

Propchange: branches/upstream/libi18n-charset-perl/current/t/rt33087.t
------------------------------------------------------------------------------
    svn:executable = *




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