Change 16426 by ams@lustre on 2002/05/06 09:48:42

           Subject: [Encode] 1.70 released
           From: Dan Kogai <[EMAIL PROTECTED]>
           Date: Mon, 6 May 2002 19:36:15 +0900
           Message-Id: <[EMAIL PROTECTED]>

Affected files ...

.... //depot/perl/ext/Encode/Changes#36 edit
.... //depot/perl/ext/Encode/Encode.pm#114 edit
.... //depot/perl/ext/Encode/bin/enc2xs#12 edit
.... //depot/perl/ext/Encode/encoding.pm#12 edit
.... //depot/perl/ext/Encode/lib/Encode/Encoding.pm#15 edit
.... //depot/perl/ext/Encode/t/Unicode.t#9 edit
.... //depot/perl/ext/Encode/t/mime-header.t#6 edit

Differences ...

==== //depot/perl/ext/Encode/Changes#36 (text) ====
Index: perl/ext/Encode/Changes
--- perl/ext/Encode/Changes#35~16392~   Sat May  4 08:58:53 2002
+++ perl/ext/Encode/Changes     Mon May  6 02:48:42 2002
@@ -1,9 +1,24 @@
 # Revision history for Perl extension Encode.
 #
-# $Id: Changes,v 1.69 2002/05/04 16:41:18 dankogai Exp dankogai $
+# $Id: Changes,v 1.70 2002/05/06 10:26:48 dankogai Exp dankogai $
 #
 
-$Revision: 1.69 $ $Date: 2002/05/04 16:41:18 $
+$Revision: 1.70 $ $Date: 2002/05/06 10:26:48 $
+! encoding.pm
+  Made more 'module-safe' with conjunction w/ 'no encoding'.
+  Message-Id: <[EMAIL PROTECTED]>
+! lib/Encode/Encoding.pm
+  'require Encode' because ->Define uses Encode::define_encoding();
+  problem and solution addressed by Miyagawa-kun
+  Message-Id: <[EMAIL PROTECTED]>
+! t/Unicode.t
+  Cuts the frill to make djgpp happier, as suggested by Laszlo
+  Message-Id: <[EMAIL PROTECTED]>
+! bin/enc2xs
+  enc2xs no longer overwrites files w/ -M option, as suggested by Andreas
+  Message-Id: <[EMAIL PROTECTED]>
+
+1.69 2002/05/04 16:41:18 
 ! lib/Encode/MIME/Header
   Floating-point coerced for UNICOS (in integer arithmetics it folds 
   line one character too early).  Verification by Mark is pending.
@@ -603,7 +618,7 @@
   Typo fixes and improvements by jhi
   Message-Id: <[EMAIL PROTECTED]>, et al.
 
-1.11  $Date: 2002/05/04 16:41:18 $
+1.11  $Date: 2002/05/06 10:26:48 $
 + t/encoding.t
 + t/jperl.t
 ! MANIFEST

==== //depot/perl/ext/Encode/Encode.pm#114 (text) ====
Index: perl/ext/Encode/Encode.pm
--- perl/ext/Encode/Encode.pm#113~16392~        Sat May  4 08:58:53 2002
+++ perl/ext/Encode/Encode.pm   Mon May  6 02:48:42 2002
@@ -1,9 +1,9 @@
 #
-# $Id: Encode.pm,v 1.69 2002/05/04 16:41:18 dankogai Exp dankogai $
+# $Id: Encode.pm,v 1.70 2002/05/06 10:27:11 dankogai Exp dankogai $
 #
 package Encode;
 use strict;
-our $VERSION = do { my @r = (q$Revision: 1.69 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.70 $ =~ /\d+/g); sprintf "%d."."%02d" x 
+$#r, @r };
 our $DEBUG = 0;
 use XSLoader ();
 XSLoader::load(__PACKAGE__, $VERSION);

==== //depot/perl/ext/Encode/bin/enc2xs#12 (text) ====
Index: perl/ext/Encode/bin/enc2xs
--- perl/ext/Encode/bin/enc2xs#11~16070~        Mon Apr 22 05:44:09 2002
+++ perl/ext/Encode/bin/enc2xs  Mon May  6 02:48:42 2002
@@ -8,7 +8,7 @@
 use strict;
 use Getopt::Std;
 my @orig_ARGV = @ARGV;
-our $VERSION  = do { my @r = (q$Revision: 1.25 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
+our $VERSION  = do { my @r = (q$Revision: 1.26 $ =~ /\d+/g); sprintf "%d."."%02d" x 
+$#r, @r };
 
 # These may get re-ordered.
 # RAW is a do_now as inserted by &enter
@@ -888,15 +888,10 @@
     $_Now = scalar localtime();
 
     eval { require File::Spec; };
-    warn "Generating Makefile.PL\n";
     _print_expand(File::Spec->catfile($_E2X,"Makefile_PL.e2x"),"Makefile.PL");
-    warn "Generating $_Name.pm\n";
     _print_expand(File::Spec->catfile($_E2X,"_PM.e2x"),        "$_Name.pm");
-    warn "Generating t/$_Name.t\n";
     _print_expand(File::Spec->catfile($_E2X,"_T.e2x"),         "t/$_Name.t");
-    warn "Generating README\n";
     _print_expand(File::Spec->catfile($_E2X,"README.e2x"),     "README");
-    warn "Generating t/$_Name.t\n";
     _print_expand(File::Spec->catfile($_E2X,"Changes.e2x"),    "Changes");
     exit;
 }
@@ -943,9 +938,9 @@
     $_LocalVer = _mkversion();
     $_E2X = find_e2x();
     $_Inc = $INC{"Encode.pm"}; $_Inc =~ s/\.pm$//o;    
-    warn "Writing ", File::Spec->catfile($_Inc,"ConfigLocal.pm"), "\n";
     _print_expand(File::Spec->catfile($_E2X,"ConfigLocal_PM.e2x"),    
-                 File::Spec->catfile($_Inc,"ConfigLocal.pm"));
+                 File::Spec->catfile($_Inc,"ConfigLocal.pm"),
+                 1);
     exit;
 }
 
@@ -959,7 +954,12 @@
     eval { require File::Basename; };
     $@ and die "File::Basename needed.  Are you on miniperl?;\nerror: $@\n";
     File::Basename->import();
-    my ($src, $dst) = @_;
+    my ($src, $dst, $clobber) = @_;
+    if (!$clobber and -e $dst){
+       warn "$dst exists. skipping\n";
+       return;
+    }
+    warn "Generating $dst...\n";
     open my $in, $src or die "$src : $!";
     if ((my $d = dirname($dst)) ne '.'){
        -d $d or mkdir $d, 0755 or die  "mkdir $d : $!";

==== //depot/perl/ext/Encode/encoding.pm#12 (text) ====
Index: perl/ext/Encode/encoding.pm
--- perl/ext/Encode/encoding.pm#11~16226~       Sat Apr 27 12:02:23 2002
+++ perl/ext/Encode/encoding.pm Mon May  6 02:48:42 2002
@@ -1,5 +1,5 @@
 package encoding;
-our $VERSION = do { my @r = (q$Revision: 1.34 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.35 $ =~ /\d+/g); sprintf "%d."."%02d" x 
+$#r, @r };
 
 use Encode;
 use strict;
@@ -75,8 +75,13 @@
 sub unimport{
     no warnings;
     undef ${^ENCODING};
+    if ($HAS_PERLIO){
+       binmode(STDIN,  ":raw");
+       binmode(STDOUT, ":raw");
+    }else{
     binmode(STDIN);
     binmode(STDOUT);
+    }
     if ($INC{"Filter/Util/Call.pm"}){
        eval { filter_del() };
     }
@@ -193,10 +198,16 @@
 =head2 NOT SCOPED
 
 The pragma is a per script, not a per block lexical.  Only the last
-C<use encoding> or C<no encoding> matters, and it affects B<the whole script>.
-However, the <no encoding> pragma is supported and C<use encoding> can
-appear as many times as you want in a given script.  The multiple use
-of this pragma is discouraged.
+C<use encoding> or C<no encoding> matters, and it affects 
+B<the whole script>.  However, the <no encoding> pragma is supported and 
+B<use encoding> can appear as many times as you want in a given script. 
+The multiple use of this pragma is discouraged.
+
+Because of this nature, the use of this pragma inside the module is
+strongly discouraged (because the influence of this pragma lasts not
+only for the module but the script that uses).  But if you have to,
+make sure you say C<no encoding> at the end of the module so you
+contain the influence of the pragma within the module.
 
 =head2 DO NOT MIX MULTIPLE ENCODINGS
 

==== //depot/perl/ext/Encode/lib/Encode/Encoding.pm#15 (text) ====
Index: perl/ext/Encode/lib/Encode/Encoding.pm
--- perl/ext/Encode/lib/Encode/Encoding.pm#14~16226~    Sat Apr 27 12:02:23 2002
+++ perl/ext/Encode/lib/Encode/Encoding.pm      Mon May  6 02:48:42 2002
@@ -1,7 +1,9 @@
 package Encode::Encoding;
 # Base class for classes which implement encodings
 use strict;
-our $VERSION = do { my @r = (q$Revision: 1.29 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
+our $VERSION = do { my @r = (q$Revision: 1.30 $ =~ /\d+/g); sprintf "%d."."%02d" x 
+$#r, @r };
+
+require Encode;
 
 sub Define
 {

==== //depot/perl/ext/Encode/t/Unicode.t#9 (text) ====
Index: perl/ext/Encode/t/Unicode.t
--- perl/ext/Encode/t/Unicode.t#8~15965~        Wed Apr 17 05:24:56 2002
+++ perl/ext/Encode/t/Unicode.t Mon May  6 02:48:42 2002
@@ -1,5 +1,5 @@
 #
-# $Id: Unicode.t,v 1.8 2002/04/16 23:35:00 dankogai Exp $
+# $Id: Unicode.t,v 1.9 2002/05/06 10:26:48 dankogai Exp dankogai $
 #
 # This script is written entirely in ASCII, even though quoted literals
 # do include non-BMP unicode characters -- Are you happy, jhi?
@@ -94,11 +94,10 @@
            $j == 0 and (0xD800 <= $i && $i <= 0xDFFF) and next;
            $utf8 .= ord($j+$i);
        }
-       my $len = length($utf8);
        for my $major ('UTF-16', 'UTF-32'){
            for my $minor ('BE', 'LE'){
                my $enc = $major.$minor;
-               is(decode($enc, encode($enc, $utf8)), $utf8, "$enc RT ($len)");
+               is(decode($enc, encode($enc, $utf8)), $utf8, "$enc RT");
            }
        }
     }

==== //depot/perl/ext/Encode/t/mime-header.t#6 (text) ====
Index: perl/ext/Encode/t/mime-header.t
--- perl/ext/Encode/t/mime-header.t#5~16392~    Sat May  4 08:58:53 2002
+++ perl/ext/Encode/t/mime-header.t     Mon May  6 02:48:42 2002
@@ -1,5 +1,5 @@
 #
-# $Id: mime-header.t,v 1.4 2002/05/04 16:41:18 dankogai Exp dankogai $
+# $Id: mime-header.t,v 1.4 2002/05/04 16:41:18 dankogai Exp $
 # This script is written in utf8
 #
 BEGIN {
End of Patch.

Reply via email to