r7221 - in /branches/upstream/libcompress-zlib-perl/current: Changes META.yml Makefile.PL README lib/Compress/Zlib.pm t/000prereq.t t/03zlib-v1.t t/14gzopen.t

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Wed Sep 5 11:36:21 UTC 2007


Author: dmn
Date: Wed Sep  5 11:36:21 2007
New Revision: 7221

URL: http://svn.debian.org/wsvn/?sc=1&rev=7221
Log:
[svn-upgrade] Integrating new upstream version, libcompress-zlib-perl (2.006)

Modified:
    branches/upstream/libcompress-zlib-perl/current/Changes
    branches/upstream/libcompress-zlib-perl/current/META.yml
    branches/upstream/libcompress-zlib-perl/current/Makefile.PL
    branches/upstream/libcompress-zlib-perl/current/README
    branches/upstream/libcompress-zlib-perl/current/lib/Compress/Zlib.pm
    branches/upstream/libcompress-zlib-perl/current/t/000prereq.t
    branches/upstream/libcompress-zlib-perl/current/t/03zlib-v1.t
    branches/upstream/libcompress-zlib-perl/current/t/14gzopen.t

Modified: branches/upstream/libcompress-zlib-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libcompress-zlib-perl/current/Changes?rev=7221&op=diff
==============================================================================
--- branches/upstream/libcompress-zlib-perl/current/Changes (original)
+++ branches/upstream/libcompress-zlib-perl/current/Changes Wed Sep  5 11:36:21 2007
@@ -1,6 +1,20 @@
 CHANGES
 -------
 
+  2.006 1 September 20007
+
+      * Makefile.PL
+        Added INSTALLDIRS directive to install as a core module when built
+        on a perl >= 5.9.
+
+      * t/03zlib-v1.t
+        Fixed crc32 and adler32 tests in to remove ascii assumption.
+
+      * lib/Compress/Zlib.pm
+        Make gzreadline not support $/, just like in Compress::Zlib 1.x
+        Folk who want $/ with readline support can get it in 
+        IO::Uncompress::Gunzip.
+        [rt.cpan.org #28663] and Debian bug #435656 http://bugs.debian.org/435656
   2.005 18 June 2007
 
       * Added info about removing Compress::Zlib version 1, before

Modified: branches/upstream/libcompress-zlib-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libcompress-zlib-perl/current/META.yml?rev=7221&op=diff
==============================================================================
--- branches/upstream/libcompress-zlib-perl/current/META.yml (original)
+++ branches/upstream/libcompress-zlib-perl/current/META.yml Wed Sep  5 11:36:21 2007
@@ -1,18 +1,18 @@
 --- #YAML:1.0
 name:                Compress-Zlib
-version:             2.005
+version:             2.006
 abstract:            Interface to zlib compression library
 license:             perl
-generated_by:        ExtUtils::MakeMaker version 6.33
+generated_by:        ExtUtils::MakeMaker version 6.36
 distribution_type:   module
 requires:     
-    Compress::Raw::Zlib:           2.005
-    IO::Compress::Base:            2.005
-    IO::Compress::Base::Common:    2.005
-    IO::Compress::Gzip:            2.005
-    IO::Compress::Gzip::Constants: 2.005
-    IO::Uncompress::Base:          2.005
-    IO::Uncompress::Gunzip:        2.005
+    Compress::Raw::Zlib:           2.006
+    IO::Compress::Base:            2.006
+    IO::Compress::Base::Common:    2.006
+    IO::Compress::Gzip:            2.006
+    IO::Compress::Gzip::Constants: 2.006
+    IO::Uncompress::Base:          2.006
+    IO::Uncompress::Gunzip:        2.006
     Scalar::Util:                  0
 meta-spec:
     url:     http://module-build.sourceforge.net/META-spec-v1.2.html

Modified: branches/upstream/libcompress-zlib-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libcompress-zlib-perl/current/Makefile.PL?rev=7221&op=diff
==============================================================================
--- branches/upstream/libcompress-zlib-perl/current/Makefile.PL (original)
+++ branches/upstream/libcompress-zlib-perl/current/Makefile.PL Wed Sep  5 11:36:21 2007
@@ -3,7 +3,7 @@
 use strict ;
 require 5.004 ;
 
-$::VERSION = '2.005' ;
+$::VERSION = '2.006' ;
 
 use private::MakeUtil;
 use ExtUtils::MakeMaker 5.16 ;
@@ -43,6 +43,8 @@
         : ()
     ),
 
+    INSTALLDIRS => ($] >= 5.009 ? 'perl' : 'site'),
+
     ((ExtUtils::MakeMaker->VERSION() gt '6.30') ?
         ('LICENSE'  => 'perl')         : ()),    
 

Modified: branches/upstream/libcompress-zlib-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libcompress-zlib-perl/current/README?rev=7221&op=diff
==============================================================================
--- branches/upstream/libcompress-zlib-perl/current/README (original)
+++ branches/upstream/libcompress-zlib-perl/current/README Wed Sep  5 11:36:21 2007
@@ -1,9 +1,9 @@
 
                              Compress::Zlib
 
-                             Version 2.005
+                             Version 2.006
 
-                              18th June 2007
+                            1st September 2007
 
 
        Copyright (c) 1995-2007 Paul Marquess. All rights reserved.
@@ -32,7 +32,7 @@
 
     * Perl 5.004 or better. 
     * Compress::Raw::Zlib
-    * IO::Compress::Gzip
+    * IO::Compress::Zlib
 
 
 

Modified: branches/upstream/libcompress-zlib-perl/current/lib/Compress/Zlib.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libcompress-zlib-perl/current/lib/Compress/Zlib.pm?rev=7221&op=diff
==============================================================================
--- branches/upstream/libcompress-zlib-perl/current/lib/Compress/Zlib.pm (original)
+++ branches/upstream/libcompress-zlib-perl/current/lib/Compress/Zlib.pm Wed Sep  5 11:36:21 2007
@@ -8,17 +8,17 @@
 use IO::Handle ;
 use Scalar::Util qw(dualvar);
 
-use IO::Compress::Base::Common 2.005 ;
-use Compress::Raw::Zlib 2.005 ;
-use IO::Compress::Gzip 2.005 ;
-use IO::Uncompress::Gunzip 2.005 ;
+use IO::Compress::Base::Common 2.006 ;
+use Compress::Raw::Zlib 2.006 ;
+use IO::Compress::Gzip 2.006 ;
+use IO::Uncompress::Gunzip 2.006 ;
 
 use strict ;
 use warnings ;
 use bytes ;
 our ($VERSION, $XS_VERSION, @ISA, @EXPORT, $AUTOLOAD);
 
-$VERSION = '2.005';
+$VERSION = '2.006';
 $XS_VERSION = $VERSION; 
 $VERSION = eval $VERSION;
 
@@ -180,7 +180,12 @@
     my $self = shift ;
 
     my $gz = $self->[0] ;
-    $_[0] = $gz->getline() ; 
+    {
+        # Maintain backward compatibility with 1.x behaviour
+        # It didn't support $/, so this can't either.
+        local $/ = "\n" ;
+        $_[0] = $gz->getline() ; 
+    }
     _save_gzerr($gz, 1);
     return defined $_[0] ? length $_[0] : 0 ;
 }
@@ -447,7 +452,7 @@
 
 package Compress::Zlib ;
 
-use IO::Compress::Gzip::Constants 2.005 ;
+use IO::Compress::Gzip::Constants 2.006 ;
 
 sub memGzip($)
 {
@@ -652,12 +657,17 @@
 reading/writing gzip files, and the C<Compress::Raw::Zlib> module for some
 low-level zlib access. 
 
-The interface provided by version 2 should be 100% backward compatible with
-version 1. If you find a difference in the expected behaviour please
-contact the author (See L</AUTHOR>). See L<GZIP INTERFACE> 
-
-If you are writing new code, your first port of call should be to use one
-these new modules.
+The interface provided by version 2 of this module should be 100% backward
+compatible with version 1. If you find a difference in the expected
+behaviour please contact the author (See L</AUTHOR>). See L<GZIP INTERFACE> 
+
+With the creation of the C<IO::Compress> and C<IO::Uncompress> modules no
+new features are planned for C<Compress::Zlib> - the new modules do
+everything that C<Compress::Zlib> does and then some. Development on
+C<Compress::Zlib> will be limited to bug fixes only.
+
+If you are writing new code, your first port of call should be one of the
+new C<IO::Compress> or C<IO::Uncompress> modules.
 
 =head1 GZIP INTERFACE
 
@@ -770,11 +780,13 @@
 
 It is legal to intermix calls to C<gzread> and C<gzreadline>.
 
-In addition, C<gzreadline> fully supports the use of of the variable C<$/>
-(C<$INPUT_RECORD_SEPARATOR> or C<$RS> when C<English> is in use) to
-determine what constitutes an end of line. Both paragraph mode and file
-slurp mode are supported. 
-
+To maintain backward compatibility with version 1.x of this module
+C<gzreadline> ignores the C<$/> variable - it I<always> uses the string
+C<"\n"> as the line delimiter.  
+
+If you want to read a gzip file a line at a time and have it respect the
+C<$/> variable (or C<$INPUT_RECORD_SEPARATOR>, or C<$RS> when C<English> is
+in use) see L<IO::Uncompress::Gunzip|IO::Uncompress::Gunzip>.
 
 =item B<$byteswritten = $gz-E<gt>gzwrite($buffer) ;>
 
@@ -1458,4 +1470,3 @@
 
 
 
-

Modified: branches/upstream/libcompress-zlib-perl/current/t/000prereq.t
URL: http://svn.debian.org/wsvn/branches/upstream/libcompress-zlib-perl/current/t/000prereq.t?rev=7221&op=diff
==============================================================================
--- branches/upstream/libcompress-zlib-perl/current/t/000prereq.t (original)
+++ branches/upstream/libcompress-zlib-perl/current/t/000prereq.t Wed Sep  5 11:36:21 2007
@@ -27,7 +27,7 @@
         if eval { require Test::NoWarnings ;  import Test::NoWarnings; 1 };
 
 
-    my $VERSION = '2.005';
+    my $VERSION = '2.006';
     my @NAMES = qw(
 			Compress::Raw::Zlib
 			IO::Compress::Base

Modified: branches/upstream/libcompress-zlib-perl/current/t/03zlib-v1.t
URL: http://svn.debian.org/wsvn/branches/upstream/libcompress-zlib-perl/current/t/03zlib-v1.t?rev=7221&op=diff
==============================================================================
--- branches/upstream/libcompress-zlib-perl/current/t/03zlib-v1.t (original)
+++ branches/upstream/libcompress-zlib-perl/current/t/03zlib-v1.t Wed Sep  5 11:36:21 2007
@@ -868,8 +868,11 @@
 {
     title 'CRC32' ;
 
-    my $data = 'ZgRNtjgSUW'; # CRC32 of this data should have the high bit set
+    # CRC32 of this data should have the high bit set
+    # value in ascii is ZgRNtjgSUW
+    my $data = "\x5a\x67\x52\x4e\x74\x6a\x67\x53\x55\x57"; 
     my $expected_crc = 0xCF707A2B ; # 3480255019 
+
     my $crc = crc32($data) ;
     is $crc, $expected_crc;
 }
@@ -877,7 +880,11 @@
 {
     title 'Adler32' ;
 
-    my $data = 'lpscOVsAJiUfNComkOfWYBcPhHZ[bT'; # adler of this data should have the high bit set
+    # adler of this data should have the high bit set
+    # value in ascii is lpscOVsAJiUfNComkOfWYBcPhHZ[bT
+    my $data = "\x6c\x70\x73\x63\x4f\x56\x73\x41\x4a\x69\x55\x66" .
+               "\x4e\x43\x6f\x6d\x6b\x4f\x66\x57\x59\x42\x63\x50" .
+               "\x68\x48\x5a\x5b\x62\x54";
     my $expected_crc = 0xAAD60AC7 ; # 2866154183 
     my $crc = adler32($data) ;
     is $crc, $expected_crc;

Modified: branches/upstream/libcompress-zlib-perl/current/t/14gzopen.t
URL: http://svn.debian.org/wsvn/branches/upstream/libcompress-zlib-perl/current/t/14gzopen.t?rev=7221&op=diff
==============================================================================
--- branches/upstream/libcompress-zlib-perl/current/t/14gzopen.t (original)
+++ branches/upstream/libcompress-zlib-perl/current/t/14gzopen.t Wed Sep  5 11:36:21 2007
@@ -20,7 +20,7 @@
     $extra = 1
         if eval { require Test::NoWarnings ;  import Test::NoWarnings; 1 };
 
-    plan tests => 217 + $extra ;
+    plan tests => 250 + $extra ;
 
     use_ok('Compress::Zlib', 2) ;
     use_ok('IO::Compress::Gzip::Constants') ;
@@ -601,3 +601,27 @@
     ok defined $buf2, "  output buffer defined";
     is $buf2, "", "  output buffer empty string";
 }
+
+{
+    title 'gzreadline does not support $/';
+
+    my $lex = new LexFile my $name ;
+
+    my $a = gzopen($name, "w");
+    my $text = "fred\n";
+    my $len = length $text;
+    $a->gzwrite($text);
+    $a->gzwrite("\n\n");
+    $a->gzclose ;
+
+    for my $delim ( undef, "", 0, 1, "abc", $text, "\n\n", "\n" )
+    {
+        local $/ = $delim;
+        my $u = gzopen($name, "r");
+        my $line;
+        is $u->gzreadline($line), length $text, "  read $len bytes";
+        is $line, $text, "  got expected line";
+        ok ! $u->gzclose, "  closed" ;
+        is $/, $delim, '  $/ unchanged by gzreadline';
+    }
+}




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