rpms/perl/devel perl-update-Compress-Raw-Zlib.patch, NONE, 1.1 perl-update-IO-Compress-Base.patch, NONE, 1.1 perl-update-IO-Compress-Zlib.patch, NONE, 1.1 perl.spec, 1.236, 1.237 perl-update-Compress_Raw_Zlib.patch, 1.1, NONE

Štěpán Kasal kasal at fedoraproject.org
Tue Dec 1 15:14:57 UTC 2009


Author: kasal

Update of /cvs/extras/rpms/perl/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14588

Modified Files:
	perl.spec 
Added Files:
	perl-update-Compress-Raw-Zlib.patch 
	perl-update-IO-Compress-Base.patch 
	perl-update-IO-Compress-Zlib.patch 
Removed Files:
	perl-update-Compress_Raw_Zlib.patch 
Log Message:
- fix patch-update-Compress-Raw-Zlib.patch (did not patch Zlib.pm)
- update Compress::Raw::Zlib to 2.023
- update IO::Compress::Base, and IO::Compress::Zlib to 2.015 (#542645)

perl-update-Compress-Raw-Zlib.patch:
 MANIFEST                                       |    1 
 ext/Compress/Raw/Zlib/Changes                  |   67 +++++
 ext/Compress/Raw/Zlib/Makefile.PL              |   13 -
 ext/Compress/Raw/Zlib/README                   |   83 ++----
 ext/Compress/Raw/Zlib/Zlib.xs                  |  116 +++++++--
 ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm |  307 +++++++++++++++++++++----
 ext/Compress/Raw/Zlib/t/02zlib.t               |  157 ++++++++++++
 ext/Compress/Raw/Zlib/t/09limitoutput.t        |  129 ++++++++++
 8 files changed, 728 insertions(+), 145 deletions(-)

--- NEW FILE perl-update-Compress-Raw-Zlib.patch ---
Compress-Raw-Zlib-2.023
(omitting changes to private/MakeUtil.pm)
(omitting changes to perl-5.10.0/t/lib/compress; these are in
IO-Compress-Base 2.015 update)

diff -urN perl-5.10.0.orig/MANIFEST perl-5.10.0/MANIFEST
--- perl-5.10.0.orig/MANIFEST	2009-12-01 14:46:37.000000000 +0100
+++ perl-5.10.0/MANIFEST	2009-12-01 15:43:34.000000000 +0100
@@ -124,6 +124,7 @@
 ext/Compress/Raw/Zlib/t/01version.t	Compress::Raw::Zlib
 ext/Compress/Raw/Zlib/t/02zlib.t	Compress::Raw::Zlib
 ext/Compress/Raw/Zlib/t/07bufsize.t	Compress::Raw::Zlib
+ext/Compress/Raw/Zlib/t/09limitoutput.t	Compress::Raw::Zlib
 ext/Compress/Raw/Zlib/t/18lvalue.t	Compress::Raw::Zlib
 ext/Compress/Raw/Zlib/typemap		Compress::Raw::Zlib
 ext/Compress/Raw/Zlib/zlib-src/adler32.c	Compress::Raw::Zlib
diff -urN perl-5.10.0.orig/ext/Compress/Raw/Zlib/Changes perl-5.10.0/ext/Compress/Raw/Zlib/Changes
--- perl-5.10.0.orig/ext/Compress/Raw/Zlib/Changes	2009-12-01 15:36:07.000000000 +0100
+++ perl-5.10.0/ext/Compress/Raw/Zlib/Changes	2009-12-01 15:38:24.000000000 +0100
@@ -1,6 +1,73 @@
 CHANGES
 -------
 
+  2.023 9 November 2009
+
+      * fixed instance where $[ should have been $] in t/02zlib.t
+        Thanks to Robin Barker and zefram [RT #50765] for independantly
+        spotting the issue.
+
+  2.021 30 August 2009
+
+      * Changed test harness so that it can cope with PERL5OPT=-MCarp=verbose
+        [RT# 47225]
+
+  2.020 3 June 2009
+
+      * Minor documentation update.
+
+  2.019 4 May 2009
+
+      * No Changes
+
+  2.018 3 May 2009
+
+      * No Changes
+
+  2.017 28 March 2009
+
+      * Added 'LimitOutput' option
+
+      * Removed MAN3PODS from Makefile.PL
+
+      * Fixed coring issue when LimitOutput was used.
+
+      * Documented Compress::Raw::Zlib::zlib_version()
+
+      * Documented Compress::Raw::Zlib::deflateReset()
+        [RT #40566]
+
+  2.015 3 September 2008
+
+      * Makefile.PL
+        Backout changes made in 2.014
+
+  2.014 2 September 2008
+
+      * Makefile.PL
+        Updated to check for indirect dependencies.
+
+  2.012 15 July 2008
+
+      * Document the gzip flags that WindowBits can take.
+
+      * Allow a dictionary to be used with a raw inflate. 
+        Needs zlib 1.2.2.1 or better.
+        [RT #36046]
+      
+  2.011 5 May 2008
+
+      * A C++-style comment sneaked in with the last update. Fixed.
+        [core patch #33828]
+
+  2.010 5 May 2008
+
+      * No Changes
+
+  2.009 20 April 2008
+
+      * No Changes
+
   2.008 2 November 2007
 
       * Minor documentation changes in README
diff -urN perl-5.10.0.orig/ext/Compress/Raw/Zlib/Makefile.PL perl-5.10.0/ext/Compress/Raw/Zlib/Makefile.PL
--- perl-5.10.0.orig/ext/Compress/Raw/Zlib/Makefile.PL	2009-12-01 14:47:16.000000000 +0100
+++ perl-5.10.0/ext/Compress/Raw/Zlib/Makefile.PL	2009-12-01 15:38:24.000000000 +0100
@@ -77,24 +77,11 @@
                     },
 
     (
-      $ENV{SKIP_FOR_CORE}
-        ? (MAN3PODS    => {})
-        : ()
-    ),
-       
-    (
       $BUILD_ZLIB
         ? zlib_files($ZLIB_LIB)
         : (LIBS => [ "-L$ZLIB_LIB -lz " ])
     ),
       
-    (
-      $] >= 5.005
-        ? (ABSTRACT_FROM => 'lib/Compress/Raw/Zlib.pm',
-            AUTHOR       => 'Paul Marquess <pmqs at cpan.org>')
-        : ()
-    ),
-
     INSTALLDIRS => ($] >= 5.009 ? 'perl' : 'site'),
 
     ((ExtUtils::MakeMaker->VERSION() gt '6.30') ?
diff -urN perl-5.10.0.orig/ext/Compress/Raw/Zlib/README perl-5.10.0/ext/Compress/Raw/Zlib/README
--- perl-5.10.0.orig/ext/Compress/Raw/Zlib/README	2009-12-01 15:36:07.000000000 +0100
+++ perl-5.10.0/ext/Compress/Raw/Zlib/README	2009-12-01 15:38:24.000000000 +0100
@@ -1,16 +1,14 @@
 
                              Compress-Raw-Zlib
 
-                             Version 2.008
+                             Version 2.023
 
-                             2nd November 2007
+                             9th November 2009
 
-
-       Copyright (c) 2005-2007 Paul Marquess. All rights reserved.
+       Copyright (c) 2005-2009 Paul Marquess. All rights reserved.
           This program is free software; you can redistribute it
            and/or modify it under the same terms as Perl itself.
 
-
               The directory zlib-src contains a subset of the 
              source files copied directly from zlib version 1.2.3.
                   These files are Copyright(C) 1995-2005
@@ -18,39 +16,27 @@
              Full source for the zlib library is available at
                             http://www.zlib.org
 
-
-
 DESCRIPTION
 -----------
 
-
 This module provides a Perl interface to the zlib compression library.  
 
-
-
-
-
 PREREQUISITES
 -------------
 
 Before you can build Compress-Raw-Zlib you need to have the following
 installed on your system:
 
-
     * A C compiler
 
     * Perl 5.004 or better. 
 
-
-
 By default, Compress-Raw-Zlib will build its own private copy of the 
 zlib library. If you want to use a different version of 
 zlib, follow the instructions in the section called 
 "Controlling the version of zlib used by Compress-Raw-Zlib" 
 later in this document.
 
-
-
 BUILDING THE MODULE
 -------------------
 
@@ -61,8 +47,6 @@
     make
     make test
 
-
-
 INSTALLATION
 ------------
 
@@ -70,9 +54,6 @@
 
     make install
 
-
-
-
 Controlling the version of zlib used by Compress-Raw-Zlib 
 ----------------------------------------------------------
 
@@ -92,7 +73,6 @@
 Note that if you intend to use either Option 2 or 3, you need to have
 zlib version 1.0.5 or better.
 
-
 The contents of the file config.in are used to control which of the
 three options is actually used. This file is read during the
 
@@ -101,8 +81,6 @@
 step of the build, so remember to make any required changes to config.in
 before building this module.
 
-
-
   Option 1
   --------
   
@@ -169,10 +147,9 @@
 ------------------------
 
 Every gzip stream stores a byte in its header to identify the Operating
-System that was used to create the gzip stream. When you build
-Compress-Raw-Zlib it will attempt to determine the value that is correct for
-your Operating System. This will then be used by IO::Gzip as the default
-value for the OS byte in all gzip headers it creates. 
+System that was used to create the gzip stream. When you build Compress-Raw-Zlib it will attempt to determine the value that is correct for
+your Operating System. This will then be used by IO::Compress::Gzip as the
+default value for the OS byte in all gzip headers it creates. 
  
 The variable GZIP_OS_CODE in the config.in file controls the setting of
 this value when building Compress-Raw-Zlib. If GZIP_OS_CODE is set to
@@ -197,16 +174,37 @@
 detected is incorrect, please take a few moments to contact the author of
 this module.
 
-
-
 TROUBLESHOOTING
 ---------------
 
+Undefined Symbol gzsetparams
+----------------------------
 
+If you get the error shown below when you run the Compress-Raw-Zlib test
+harness it probably means you are running a copy of zlib that is
+version 1.0.5 or older.
 
+t/01version.........Can't load 'blib/arch/auto/Compress/Zlib/Zlib.so' for 
+                    module Compress::Raw::Zlib: blib/arch/auto/Compress/Raw/Zlib/Zlib.so:
+                    undefined symbol: gzsetparams at ...
 
+There are two ways to fix this problem:
 
+    1. Upgrade to the latest version of zlib.
 
+    2. Edit config.in and set the OLD_ZLIB variable to True.
+
+Test Harness 01version fails
+----------------------------
+If the 01version test harness fails, and the problem isn't covered by the
+scenario above, it probably means that you have two versions of 
+zlib installed on your system.
+
+Run the command below to see if this is indeed the case
+
+    make test TEST_VERBOSE=1 TEST_FILES=t/01version.t 
+
+Try removing the one you don't want to use and rebuild.   
 
 Solaris build fails with "language optional software package not installed"
 ---------------------------------------------------------------------------
@@ -245,9 +243,6 @@
 If that doesn't work for you, it's time to make changes to the Makefile
 by hand. Good luck!
 
-
-
-
 Solaris build fails with "gcc: unrecognized option `-KPIC'"
 -----------------------------------------------------------
 
@@ -285,10 +280,6 @@
 is necessary to have first built the zlib library with the -fpic
 option.
 
-
-
-
-
 Linux Notes
 -----------
 
@@ -307,9 +298,6 @@
 for zlib. Check for an RPM that start with "zlib-devel" in your Linux
 distribution.
 
-
-
-
 Win32 Notes
 -----------
 
@@ -318,15 +306,11 @@
 newer version of Compress-Raw-Zlib is available run this from the command
 prompt
 
-    C:\> ppm verify -upgrade Compress-Zlib
-
+    C:\> ppm verify -upgrade Compress-Raw-Zlib
 
 If you are not running Activestate Perl and you don't have access
 to a C compiler, you will not be able to build and install this module.
 
-
-
-
 Win32 & Cygwin Notes
 --------------------
 
@@ -338,7 +322,6 @@
 The workaround is to install Compress-Raw-Zlib manually using the
 instructions given at the start of this file.
 
-
 FEEDBACK
 --------
 
@@ -372,8 +355,7 @@
         If you haven't installed Compress-Raw-Zlib then search Compress::Raw::Zlib.pm
         for a line like this:
 
-          $VERSION = "2.008" ;
-
+          $VERSION = "2.023" ;
 
      c. The version of zlib you have used.
         If you have successfully installed Compress-Raw-Zlib, this one-liner
@@ -381,10 +363,8 @@
 
           perl -MCompress::Raw::Zlib -e "print q[zlib ver ]. Compress::Raw::Zlib::ZLIB_VERSION.qq[\n]" 
 
-
         If not, look at the beginning of the file zlib.h. 
 
-
  2. If you are having problems building Compress-Raw-Zlib, send me a
     complete log of what happened. Start by unpacking the Compress-Raw-Zlib
     module into a fresh directory and keep a log of all the steps
@@ -394,5 +374,4 @@
         make
         make test TEST_VERBOSE=1          
 
-
 Paul Marquess <pmqs at cpan.org>
diff -urN perl-5.10.0.orig/ext/Compress/Raw/Zlib/Zlib.xs perl-5.10.0/ext/Compress/Raw/Zlib/Zlib.xs
--- perl-5.10.0.orig/ext/Compress/Raw/Zlib/Zlib.xs	2009-12-01 15:36:07.000000000 +0100
+++ perl-5.10.0/ext/Compress/Raw/Zlib/Zlib.xs	2009-12-01 15:38:24.000000000 +0100
@@ -3,7 +3,7 @@
  * Created : 22nd January 1996
  * Version : 2.000
  *
- *   Copyright (c) 1995-2007 Paul Marquess. All rights reserved.
+ *   Copyright (c) 1995-2009 Paul Marquess. All rights reserved.
  *   This program is free software; you can redistribute it and/or
  *   modify it under the same terms as Perl itself.
  *
@@ -50,6 +50,10 @@
 #  define AT_LEAST_ZLIB_1_2_2_1
 #endif
 
+#if  defined(ZLIB_VERNUM) && ZLIB_VERNUM >= 0x1222
+#  define AT_LEAST_ZLIB_1_2_2_2
+#endif
+
 #if  defined(ZLIB_VERNUM) && ZLIB_VERNUM >= 0x1223
 #  define AT_LEAST_ZLIB_1_2_2_3
 #endif
@@ -64,6 +68,11 @@
 #  include "ppport.h"
 #endif
 
+#if PERL_REVISION == 5 && PERL_VERSION == 9
+    /* For Andreas */
+#   define sv_pvbyte_force(sv,lp) sv_pvbyten_force(sv,lp)
+#endif
+
 #if PERL_REVISION == 5 && (PERL_VERSION < 8 || (PERL_VERSION == 8 && PERL_SUBVERSION < 4 ))
 
 #    ifdef SvPVbyte_force
@@ -103,6 +112,7 @@
 #define FLAG_CRC32              2
 #define FLAG_ADLER32            4
 #define FLAG_CONSUME_INPUT      8
+#define FLAG_LIMIT_OUTPUT       16
     uLong    crc32 ;
     uLong    adler32 ;
     z_stream stream;
@@ -228,7 +238,8 @@
 #define adlerInitial adler32(0L, Z_NULL, 0)
 #define crcInitial crc32(0L, Z_NULL, 0)
 
-static const char * const my_z_errmsg[] = {
+/* static const char * const my_z_errmsg[] = { */
+static const char my_z_errmsg[][32] = {
     "need dictionary",     /* Z_NEED_DICT     2 */
     "stream end",          /* Z_STREAM_END    1 */
     "",                    /* Z_OK            0 */
@@ -460,6 +471,8 @@
         printf("           CRC32     %s\n",   EnDis(FLAG_CRC32));
         printf("           ADLER32   %s\n",   EnDis(FLAG_ADLER32));
         printf("           CONSUME   %s\n",   EnDis(FLAG_CONSUME_INPUT));
+        printf("           LIMIT     %s\n",   EnDis(FLAG_LIMIT_OUTPUT));
+
 
 #ifdef MAGIC_APPEND
         printf("    window           0x%p\n", s->window);
@@ -510,7 +523,7 @@
 
 static SV* 
 #ifdef CAN_PROTOTYPE
-deRef(SV * sv, char * string)
+deRef(SV * sv, const char * string)
 #else
 deRef(sv, string)
 SV * sv ;
@@ -528,6 +541,8 @@
             case SVt_PVHV:
             case SVt_PVCV:
                 croak("%s: buffer parameter is not a SCALAR reference", string);
+            default:
+                break;
         }
         if (SvROK(sv))
             croak("%s: buffer parameter is a reference to a reference", string) ;
@@ -542,7 +557,7 @@
 
 static SV*
 #ifdef CAN_PROTOTYPE
-deRef_l(SV * sv, char * string)
+deRef_l(SV * sv, const char * string)
 #else
 deRef_l(sv, string)
 SV * sv ;
@@ -565,6 +580,8 @@
             case SVt_PVHV:
             case SVt_PVCV:
                 croak("%s: buffer parameter is not a SCALAR reference", string);
+            default:
+                break;
         }
         if (SvROK(sv))
             croak("%s: buffer parameter is a reference to a reference", string) ;
@@ -802,6 +819,19 @@
             s = NULL ;
 	}
 	else if (SvCUR(dictionary)) {
+#ifdef AT_LEAST_ZLIB_1_2_2_1
+        /* Zlib 1.2.2.1 or better allows a dictionary with raw inflate */
+        if (s->WindowBits < 0) {
+            err = inflateSetDictionary(&(s->stream), 
+                (const Bytef*)SvPVbyte_nolen(dictionary),
+                SvCUR(dictionary));
+            if (err != Z_OK) {
+                Safefree(s) ;
+                s = NULL ;
+            }
+        }
+        else
+#endif   
             /* Dictionary specified - take a copy for use in inflate */
 	    s->dictionary = newSVsv(dictionary) ;
 	}
@@ -1246,7 +1276,7 @@
     bool 	eof 
     uInt	cur_length = 0;
     uInt	prefix_length = 0;
-    uInt	increment = 0;
+    int	    increment = 0;
     STRLEN  stmp    = NO_INIT
     uLong     bufinc = NO_INIT
   PREINIT:
@@ -1280,22 +1310,39 @@
     if((s->flags & FLAG_APPEND) != FLAG_APPEND) {
         SvCUR_set(output, 0);
     }
+   
+    /* Assume no output buffer - the code below will update if there is any available */
+    s->stream.avail_out = 0;
+
+
     if (SvLEN(output)) {
         prefix_length = cur_length =  SvCUR(output) ;
-        s->stream.next_out = (Bytef*) SvPVbyte_nolen(output) + cur_length;
-        increment = SvLEN(output) -  cur_length - 1;
-        s->stream.avail_out = increment;
-    }
-    else {
-        s->stream.avail_out = 0;
+    
+        if (s->flags & FLAG_LIMIT_OUTPUT && SvLEN(output) - cur_length - 1 < bufinc)
+        {
+            Sv_Grow(output, bufinc + cur_length + 1) ;
+        }
+    
+        /* Only setup the stream output pointers if there is spare 
+           capacity in the outout SV
+        */
+        if (SvLEN(output) > cur_length + 1)
+        {
+            s->stream.next_out = (Bytef*) SvPVbyte_nolen(output) + cur_length;
+            increment = SvLEN(output) -  cur_length - 1;
+            s->stream.avail_out = increment;
+        }
     }
+    
+
     s->bytesInflated = 0;
     
-    while (1) {
+    RETVAL = Z_OK;
 
-        if (s->stream.avail_out == 0 ) {
+    while (RETVAL == Z_OK) {
+        if (s->stream.avail_out == 0) {
 	    /* out of space in the output buffer so make it bigger */
-            Sv_Grow(output, SvLEN(output) + bufinc) ;
+            Sv_Grow(output, SvLEN(output) + bufinc +1) ;
             cur_length += increment ;
             s->stream.next_out = (Bytef*) SvPVbyte_nolen(output) + cur_length ;
             increment = bufinc ;
@@ -1303,10 +1350,30 @@
             bufinc *= 2 ; 
         }
 
+        /* printf("INFLATE Availl In %d, Out %d\n", s->stream.avail_in,
+ s->stream.avail_out); 
+DispStream(s, "BEFORE");
+Perl_sv_dump(output); */
         RETVAL = inflate(&(s->stream), Z_SYNC_FLUSH);
+        /* printf("INFLATE returned %d %s, avail in %d, out %d\n", RETVAL,
+ GetErrorString(RETVAL), s->stream.avail_in, s->stream.avail_out); */
+
+    
+        if (RETVAL == Z_NEED_DICT && s->dictionary) {
+            s->dict_adler = s->stream.adler ;
+            RETVAL = inflateSetDictionary(&(s->stream), 
+            (const Bytef*)SvPVbyte_nolen(s->dictionary),
+            SvCUR(s->dictionary));
+            if (RETVAL == Z_OK)
+                continue;
+        }
+        
+        if (s->flags & FLAG_LIMIT_OUTPUT && 
+                (RETVAL == Z_OK || RETVAL == Z_BUF_ERROR ))
+            break;
 
         if (RETVAL == Z_STREAM_ERROR || RETVAL == Z_MEM_ERROR ||
-            RETVAL == Z_DATA_ERROR  || RETVAL == Z_STREAM_END )
+            RETVAL == Z_DATA_ERROR   || RETVAL == Z_STREAM_END )
             break ;
 
         if (RETVAL == Z_BUF_ERROR) {
@@ -1317,19 +1384,9 @@
                 break ;
             }
         }
-	
-        if (RETVAL == Z_NEED_DICT && s->dictionary) {
-            s->dict_adler = s->stream.adler ;
-            RETVAL = inflateSetDictionary(&(s->stream), 
-            (const Bytef*)SvPVbyte_nolen(s->dictionary),
-            SvCUR(s->dictionary));
-        }
-
-        if (RETVAL != Z_OK) 
-            break;
     }
 #ifdef NEED_DUMMY_BYTE_AT_END 
-    if (eof && RETVAL == Z_OK) {
+    if (eof && RETVAL == Z_OK && s->flags & FLAG_LIMIT_OUTPUT == 0) {
         Bytef* nextIn =  s->stream.next_in;
         uInt availIn =  s->stream.avail_in;
         s->stream.next_in = (Bytef*) " ";
@@ -1350,8 +1407,8 @@
 #endif
     
     s->last_error = RETVAL ;
-    if (RETVAL == Z_OK || RETVAL == Z_STREAM_END || RETVAL == Z_DATA_ERROR) {
-	unsigned in ;
+    if (RETVAL == Z_OK || RETVAL == Z_STREAM_END || RETVAL == Z_BUF_ERROR || RETVAL == Z_DATA_ERROR) {
+	   unsigned in ;
 
         s->bytesInflated = cur_length + increment - s->stream.avail_out - prefix_length;
         s->uncompressedBytes += s->bytesInflated ;
@@ -1377,7 +1434,7 @@
             			SvCUR(output)-prefix_length) ;
 
 	/* fix the input buffer */
-	if (s->flags & FLAG_CONSUME_INPUT) {
+	if (s->flags & FLAG_CONSUME_INPUT || s->flags & FLAG_LIMIT_OUTPUT) {
 	    in = s->stream.avail_in ;
 	    SvCUR_set(buf, in) ;
 	    if (in)
@@ -1385,6 +1442,7 @@
             *SvEND(buf) = '\0';
             SvSETMAGIC(buf);
 	}
+
     }
     OUTPUT:
 	RETVAL
diff -urN perl-5.10.0.orig/ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm perl-5.10.0/ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm
--- perl-5.10.0.orig/ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm	2009-12-01 15:36:07.000000000 +0100
+++ perl-5.10.0/ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm	2009-12-01 15:38:24.000000000 +0100
@@ -13,7 +13,7 @@
 use bytes ;
 our ($VERSION, $XS_VERSION, @ISA, @EXPORT, $AUTOLOAD);
 
-$VERSION = '2.008';
+$VERSION = '2.023';
 $XS_VERSION = $VERSION; 
 $VERSION = eval $VERSION;
 
@@ -62,8 +62,13 @@
         Z_SYNC_FLUSH
         Z_UNKNOWN
         Z_VERSION_ERROR
+
+        WANT_GZIP
+        WANT_GZIP_OR_ZLIB
 );
 
+use constant WANT_GZIP           => 16;
+use constant WANT_GZIP_OR_ZLIB   => 32;
 
 sub AUTOLOAD {
     my($constname);
@@ -79,6 +84,7 @@
 use constant FLAG_CRC                => 2 ;
 use constant FLAG_ADLER              => 4 ;
 use constant FLAG_CONSUME_INPUT      => 8 ;
+use constant FLAG_LIMIT_OUTPUT       => 16 ;
 
 eval {
     require XSLoader;
@@ -361,10 +367,14 @@
     $flags |= FLAG_CRC    if $got->value('CRC32') ;
     $flags |= FLAG_ADLER  if $got->value('ADLER32') ;
 
+    my $windowBits =  $got->value('WindowBits');
+    $windowBits += MAX_WBITS()
+        if ($windowBits & MAX_WBITS()) == 0 ;
+
     _deflateInit($flags,
                 $got->value('Level'), 
                 $got->value('Method'), 
-                $got->value('WindowBits'), 
+                $windowBits, 
                 $got->value('MemLevel'), 
                 $got->value('Strategy'), 
                 $got->value('Bufsize'),
@@ -378,6 +388,7 @@
     my ($got) = ParseParameters(0,
                     {
                         'AppendOutput'  => [1, 1, Parse_boolean,  0],
+                        'LimitOutput'   => [1, 1, Parse_boolean,  0],
                         'CRC32'         => [1, 1, Parse_boolean,  0],
                         'ADLER32'       => [1, 1, Parse_boolean,  0],
                         'ConsumeInput'  => [1, 1, Parse_boolean,  1],
@@ -397,8 +408,14 @@
     $flags |= FLAG_CRC    if $got->value('CRC32') ;
     $flags |= FLAG_ADLER  if $got->value('ADLER32') ;
     $flags |= FLAG_CONSUME_INPUT if $got->value('ConsumeInput') ;
+    $flags |= FLAG_LIMIT_OUTPUT if $got->value('LimitOutput') ;
+
+
+    my $windowBits =  $got->value('WindowBits');
+    $windowBits += MAX_WBITS()
+        if ($windowBits & MAX_WBITS()) == 0 ;
 
-    _inflateInit($flags, $got->value('WindowBits'), $got->value('Bufsize'), 
+    _inflateInit($flags, $windowBits, $got->value('Bufsize'), 
                  $got->value('Dictionary')) ;
 }
 
@@ -530,6 +547,7 @@
     ($d, $status) = new Compress::Raw::Zlib::Deflate( [OPT] ) ;
     $status = $d->deflate($input, $output) ;
     $status = $d->flush($output [, $flush_type]) ;
+    $d->deflateReset() ;
     $d->deflateParams(OPTS) ;
     $d->deflateTune(OPTS) ;
     $d->dict_adler() ;
@@ -559,8 +577,7 @@
     $crc = adler32_combine($crc1, $crc2, $len2)l
     $crc = crc32_combine($adler1, $adler2, $len2)
 
-    ZLIB_VERSION
-    ZLIB_VERNUM
+    my $version = Compress::Raw::Zlib::zlib_version();
 
 =head1 DESCRIPTION
 
@@ -568,8 +585,6 @@
 compression library (see L</AUTHOR> for details about where to get
 I<zlib>). 
 
-
-
 =head1 Compress::Raw::Zlib::Deflate
 
 This section defines an interface that allows in-memory compression using
@@ -577,7 +592,6 @@
 
 Here is a definition of the interface available:
 
-
 =head2 B<($d, $status) = new Compress::Raw::Zlib::Deflate( [OPT] ) >
 
 Initialises a deflation object. 
@@ -610,7 +624,7 @@
 C<Z_NO_COMPRESSION>, C<Z_BEST_SPEED>, C<Z_BEST_COMPRESSION>, and
 C<Z_DEFAULT_COMPRESSION>.
 
-The default is Z_DEFAULT_COMPRESSION.
+The default is C<Z_DEFAULT_COMPRESSION>.
 
 =item B<-Method>
 
@@ -619,10 +633,18 @@
 
 =item B<-WindowBits>
 
+To compress an RFC 1950 data stream, set C<WindowBits> to a positive
+number between 8 and 15.
+
+To compress an RFC 1951 data stream, set C<WindowBits> to C<-MAX_WBITS>.
+
+To compress an RFC 1952 data stream (i.e. gzip), set C<WindowBits> to
+C<WANT_GZIP>.
+
 For a definition of the meaning and valid values for C<WindowBits>
 refer to the I<zlib> documentation for I<deflateInit2>.
 
-Defaults to MAX_WBITS.
+Defaults to C<MAX_WBITS>.
 
 =item B<-MemLevel>
 
@@ -678,7 +700,6 @@
 
 This option defaults to false.
 
-
 =item B<-ADLER32>
 
 If set to true, an adler32 checksum of the uncompressed data will be
@@ -686,7 +707,6 @@
 
 This option defaults to false.
 
-
 =back
 
 Here is an example of using the C<Compress::Raw::Zlib::Deflate> optional
@@ -696,7 +716,6 @@
     my $d = new Compress::Raw::Zlib::Deflate ( -Bufsize => 300, 
                                                -Level   => Z_BEST_SPEED ) ;
 
-
 =head2 B<$status = $d-E<gt>deflate($input, $output)>
 
 Deflates the contents of C<$input> and writes the compressed data to
@@ -744,6 +763,16 @@
 it is false, C<$output> will be truncated before any compressed data is
 written to it.
 
+=head2 B<$status = $d-E<gt>deflateReset() >
+
+This method will reset the deflation object C<$d>. It can be used when you
+are compressing multiple data streams and want to use the same object to
+compress each of them. It should only be used once the previous data stream
+has been flushed successfully, i.e. a call to C<< $d->flush(Z_FINISH) >> has
+returned C<Z_OK>.
+
+Returns C<Z_OK> if successful.
+
 =head2 B<$status = $d-E<gt>deflateParams([OPT])>
 
 Change settings for the deflate object C<$d>.
@@ -751,7 +780,6 @@
 The list of the valid options is shown below. Options not specified
 will remain unchanged.
 
-
 =over 5
 
 =item B<-Level>
@@ -772,7 +800,6 @@
 reallocated to increase the size, it will grow in increments of
 C<Bufsize>.
 
-
 =back
 
 =head2 B<$status = $d-E<gt>deflateTune($good_length, $max_lazy, $nice_length, $max_chain)>
@@ -815,7 +842,6 @@
 Returns the deflation strategy currently used. Valid values are
 C<Z_DEFAULT_STRATEGY>, C<Z_FILTERED> and C<Z_HUFFMAN_ONLY>. 
 
-
 =head2 B<$d-E<gt>get_Level()>
 
 Returns the compression level being used. 
@@ -826,7 +852,6 @@
 
 =head2 Example
 
-
 Here is a trivial example of using C<deflate>. It simply reads standard
 input, deflates it and writes it to standard output.
 
@@ -865,7 +890,6 @@
 
 Here is a definition of the interface:
 
-
 =head2 B< ($i, $status) = new Compress::Raw::Zlib::Inflate( [OPT] ) >
 
 Initialises an inflation object. 
@@ -894,14 +918,20 @@
 =item B<-WindowBits>
 
 To uncompress an RFC 1950 data stream, set C<WindowBits> to a positive
-number.
+number between 8 and 15.
 
 To uncompress an RFC 1951 data stream, set C<WindowBits> to C<-MAX_WBITS>.
 
+To uncompress an RFC 1952 data stream (i.e. gzip), set C<WindowBits> to
+C<WANT_GZIP>.
+
+To auto-detect and uncompress an RFC 1950 or RFC 1952 data stream (i.e.
+gzip), set C<WindowBits> to C<WANT_GZIP_OR_ZLIB>.
+
 For a full definition of the meaning and valid values for C<WindowBits>
 refer to the I<zlib> documentation for I<inflateInit2>.
 
-Defaults to MAX_WBITS.
+Defaults to C<MAX_WBITS>.
 
 =item B<-Bufsize>
 
@@ -928,7 +958,6 @@
 
 This option defaults to false.
 
-
 =item B<-CRC32>
 
 If set to true, a crc32 checksum of the uncompressed data will be
@@ -946,7 +975,7 @@
 =item B<-ConsumeInput>
 
 If set to true, this option will remove compressed data from the input
-buffer of the the C< $i-E<gt>inflate > method as the inflate progresses.
+buffer of the C<< $i->inflate >> method as the inflate progresses.
 
 This option can be useful when you are processing compressed data that is
 embedded in another file/buffer. In this case the data that immediately
@@ -954,6 +983,29 @@
 
 This option defaults to true.
 
+=item B<-LimitOutput>
+
+The C<LimitOutput> option changes the behavior of the C<< $i->inflate >>
+method so that the amount of memory used by the output buffer can be
+limited. 
+
+When C<LimitOutput> is used the size of the output buffer used will either
+be the value of the C<Bufsize> option or the amount of memory already
+allocated to C<$output>, whichever is larger. Predicting the output size
+available is tricky, so don't rely on getting an exact output buffer size.
+
+When C<LimitOutout> is not specified C<< $i->inflate >> will use as much
+memory as it takes to write all the uncompressed data it creates by
+uncompressing the input buffer.
+
+If C<LimitOutput> is enabled, the C<ConsumeInput> option will also be
+enabled.
+
+This option defaults to false.
+
+See L</The LimitOutput option> for a discussion on why C<LimitOutput> is
+needed and how to use it.
+
 =back
 
 Here is an example of using an optional parameter to override the default
@@ -1048,7 +1100,6 @@
 data streams. They must have been added explicitly when the data stream
 was created by calling C<Compress::Deflate::flush>  with C<Z_FULL_FLUSH>.
 
-
 =head2 B<$i-E<gt>dict_adler()>
 
 Returns the adler32 value for the dictionary.
@@ -1083,7 +1134,7 @@
 
 Returns the buffer size used to carry out the decompression.
 
-=head2 Example
+=head2 Examples
 
 Here is an example of using C<inflate>.
 
@@ -1102,10 +1153,9 @@
     my ($output, $status) ;
     while (read(STDIN, $input, 4096))
     {
-        $status = $x->inflate(\$input, $output) ;
+        $status = $x->inflate($input, $output) ;
     
-        print $output 
-            if $status == Z_OK or $status == Z_STREAM_END ;
+        print $output ;
     
         last if $status != Z_OK ;
     }
@@ -1113,6 +1163,46 @@
     die "inflation failed\n"
         unless $status == Z_STREAM_END ;
 
+The next example show how to use the C<LimitOutput> option. Notice the use
+of two nested loops in this case. The outer loop reads the data from the
+input source - STDIN and the inner loop repeatedly calls C<inflate> until
+C<$input> is exhausted, we get an error, or the end of the stream is
+reached. One point worth remembering is by using the C<LimitOutput> option
+you also get C<ConsumeInput> set as well - this makes the code below much
+simpler.
+
+    use strict ;
+    use warnings ;
+    
+    use Compress::Raw::Zlib;
+    
+    my $x = new Compress::Raw::Zlib::Inflate(LimitOutput => 1)
+       or die "Cannot create a inflation stream\n" ;
+    
+    my $input = '' ;
+    binmode STDIN;
+    binmode STDOUT;
+    
+    my ($output, $status) ;
+
+  OUTER:
+    while (read(STDIN, $input, 4096))
+    {
+        do
+        {
+            $status = $x->inflate($input, $output) ;
+
+            print $output ;
+
+            last OUTER
+                unless $status == Z_OK || $status == Z_BUF_ERROR ;
+        }
+        while ($status == Z_OK && length $input);
+    }
+    
+    die "inflation failed\n"
+        unless $status == Z_STREAM_END ;
+
 =head1 CHECKSUM FUNCTIONS
 
 Two functions are provided by I<zlib> to calculate checksums. For the
@@ -1135,24 +1225,163 @@
 
 These functions allow checksums to be merged.
 
-=head1 ACCESSING ZIP FILES
+=head1 Misc
+
+=head2 my $version = Compress::Raw::Zlib::zlib_version();
+
+Returns the version of the zlib library.
+
+=head1 The LimitOutput option.
+
+By default C<< $i->inflate($input, $output) >> will uncompress I<all> data
+in C<$input> and write I<all> of the uncompressed data it has generated to
+C<$output>. This makes the interface to C<inflate> much simpler - if the
+method has uncompressed C<$input> successfully I<all> compressed data in
+C<$input> will have been dealt with. So if you are reading from an input
+source and uncompressing as you go the code will look something like this
+
+    use strict ;
+    use warnings ;
+    
+    use Compress::Raw::Zlib;
+    
+    my $x = new Compress::Raw::Zlib::Inflate()
+       or die "Cannot create a inflation stream\n" ;
+    
+    my $input = '' ;
+    
+    my ($output, $status) ;
+    while (read(STDIN, $input, 4096))
+    {
+        $status = $x->inflate($input, $output) ;
+    
+        print $output ;
+    
+        last if $status != Z_OK ;
+    }
+    
+    die "inflation failed\n"
+        unless $status == Z_STREAM_END ;
+
+The points to note are 
+
+=over 5
+
+=item *
+
+The main processing loop in the code handles reading of compressed data
+from STDIN.
+
+=item *
+
+The status code returned from C<inflate> will only trigger termination of
+the main processing loop if it isn't C<Z_OK>. When C<LimitOutput> has not
+been used the C<Z_OK> status means means that the end of the compressed
+data stream has been reached or there has been an error in uncompression.
+
+=item *
+
+After the call to C<inflate> I<all> of the uncompressed data in C<$input>
+will have been processed. This means the subsequent call to C<read> can
+overwrite it's contents without any problem.
+
+=back
+
+For most use-cases the behavior described above is acceptable (this module
+and it's predecessor, C<Compress::Zlib>, have used it for over 10 years
+without an issue), but in a few very specific use-cases the amount of
+memory required for C<$output> can prohibitively large. For example, if the
+compressed data stream contains the same pattern repeated thousands of
+times, a relatively small compressed data stream can uncompress into
+hundreds of megabytes.  Remember C<inflate> will keep allocating memory
+until I<all> the uncompressed data has been written to the output buffer -
+the size of C<$output> is unbounded. 
+
+The C<LimitOutput> option is designed to help with this use-case.
+
+The main difference in your code when using C<LimitOutput> is having to
+deal with cases where the C<$input> parameter still contains some
+uncompressed data that C<inflate> hasn't processed yet. The status code
+returned from C<inflate> will be C<Z_OK> if uncompression took place and
+C<Z_BUF_ERROR> if the output buffer is full.
+
+Below is typical code that shows how to use C<LimitOutput>.
+
+    use strict ;
+    use warnings ;
+    
+    use Compress::Raw::Zlib;
+    
+    my $x = new Compress::Raw::Zlib::Inflate(LimitOutput => 1)
+       or die "Cannot create a inflation stream\n" ;
+    
+    my $input = '' ;
+    binmode STDIN;
+    binmode STDOUT;
+    
+    my ($output, $status) ;
+
+  OUTER:
+    while (read(STDIN, $input, 4096))
+    {
+        do
+        {
+            $status = $x->inflate($input, $output) ;
 
-Although it is possible (with some effort on your part) to use this
-module to access .zip files, there is a module on CPAN that will do all
-the hard work for you. Check out the C<Archive::Zip> module on CPAN at
+            print $output ;
 
-    http://www.cpan.org/modules/by-module/Archive/Archive-Zip-*.tar.gz    
+            last OUTER
+                unless $status == Z_OK || $status == Z_BUF_ERROR ;
+        }
+        while ($status == Z_OK && length $input);
+    }
+    
+    die "inflation failed\n"
+        unless $status == Z_STREAM_END ;
 
+Points to note this time:
+
+=over 5
+
+=item *
+
+There are now two nested loops in the code: the outer loop for reading the
+compressed data from STDIN, as before; and the inner loop to carry out the
+uncompression.
+
+=item *
+
+There are two exit points from the inner uncompression loop.
+
+Firstly when C<inflate> has returned a status other than C<Z_OK> or
+C<Z_BUF_ERROR>.  This means that either the end of the compressed data
+stream has been reached (C<Z_STREAM_END>) or there is an error in the
+compressed data. In either of these cases there is no point in continuing
+with reading the compressed data, so both loops are terminated.
+
+The second exit point tests if there is any data left in the input buffer,
+C<$input> - remember that the C<ConsumeInput> option is automatically
+enabled when C<LimitOutput> is used.  When the input buffer has been
+exhausted, the outer loop can run again and overwrite a now empty
+C<$input>.
+
+=back
+
+=head1 ACCESSING ZIP FILES
+
+Although it is possible (with some effort on your part) to use this module
+to access .zip files, there are other perl modules available that will
+do all the hard work for you. Check out C<Archive::Zip>,
+C<IO::Compress::Zip> and C<IO::Uncompress::Unzip>.
 
 =head1 CONSTANTS
 
 All the I<zlib> constants are automatically imported when you make use
 of I<Compress::Raw::Zlib>.
 
-
 =head1 SEE ALSO
 
-L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress>
+L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress>
 
 L<Compress::Zlib::FAQ|Compress::Zlib::FAQ>
 
@@ -1160,7 +1389,6 @@
 L<Archive::Tar|Archive::Tar>,
 L<IO::Zlib|IO::Zlib>
 
-
 For RFC 1950, 1951 and 1952 see 
 F<http://www.faqs.org/rfcs/rfc1950.html>,
 F<http://www.faqs.org/rfcs/rfc1951.html> and
@@ -1174,25 +1402,18 @@
 
 The primary site for gzip is F<http://www.gzip.org>.
 
-
-
-
 =head1 AUTHOR
 
 This module was written by Paul Marquess, F<pmqs at cpan.org>. 
 
-
-
 =head1 MODIFICATION HISTORY
 
 See the Changes file.
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (c) 2005-2007 Paul Marquess. All rights reserved.
+Copyright (c) 2005-2009 Paul Marquess. All rights reserved.
 
 This program is free software; you can redistribute it and/or
 modify it under the same terms as Perl itself.
 
-
-
diff -urN perl-5.10.0.orig/ext/Compress/Raw/Zlib/t/02zlib.t perl-5.10.0/ext/Compress/Raw/Zlib/t/02zlib.t
--- perl-5.10.0.orig/ext/Compress/Raw/Zlib/t/02zlib.t	2009-12-01 15:36:07.000000000 +0100
+++ perl-5.10.0/ext/Compress/Raw/Zlib/t/02zlib.t	2009-12-01 15:38:24.000000000 +0100
@@ -24,13 +24,13 @@
 
     my $count = 0 ;
     if ($] < 5.005) {
-        $count = 189 ;
+        $count = 230 ;
     }
     elsif ($] >= 5.006) {
-        $count = 243 ;
+        $count = 300 ;
     }
     else {
-        $count = 201 ;
+        $count = 258 ;
     }
 
     plan tests => $count + $extra;
@@ -443,10 +443,13 @@
     
     # create a flush point
     cmp_ok $x->flush($Answer, Z_FULL_FLUSH), '==', Z_OK ;
+    
+    my $len1 = length $Answer;
      
     cmp_ok $x->deflate($goodbye, $Answer), '==', Z_OK;
     
     cmp_ok $x->flush($Answer), '==', Z_OK ;
+    my $len2 = length($Answer) - $len1 ;
      
     my ($first, @Answer) = split('', $Answer) ;
      
@@ -475,7 +478,6 @@
         $GOT .= $Z if defined $Z ;
         # print "x $status\n";
         last if $status == Z_STREAM_END or $status != Z_OK ;
-     
     }
      
     cmp_ok $status, '==', Z_DATA_ERROR ;
@@ -488,7 +490,7 @@
     my $initial = $1 ;
 
     
-    ok(($k, $err) = new Compress::Raw::Zlib::Inflate(-ConsumeInput => 0)) ;
+    ok(($k, $err) = new Compress::Raw::Zlib::Inflate(ConsumeInput => 0)) ;
     ok $k ;
     cmp_ok $err, '==', Z_OK ;
      
@@ -499,8 +501,11 @@
     cmp_ok $status, '==', Z_OK
      or diag "status '$status'\nlength rest is " . length($rest) . "\n" ;
      
-    cmp_ok $k->inflate($rest, $GOT), '==', Z_DATA_ERROR;
-    is $Z . $GOT, $goodbye ;
+    is length($rest), $len2, "expected compressed output";
+    
+    $GOT = ''; 
+    cmp_ok $k->inflate($rest, $GOT), '==', Z_DATA_ERROR, "inflate returns Z_DATA_ERROR";
+    is $GOT, $goodbye ;
 }
 
 {
@@ -598,7 +603,7 @@
 
 foreach (1 .. 2)
 {
-    next if $[ < 5.005 ;
+    next if $] < 5.005 ;
 
     title 'test inflate/deflate with a substr';
 
@@ -726,6 +731,142 @@
     ok 1, "resetLastBlockByte(undef) is ok" ;
 }
 
+{
+
+    title "gzip mode";
+    # ================
+
+    my $hello = "I am a HAL 9000 computer" ;
+    my @hello = split('', $hello) ;
+    my ($err, $x, $X, $status); 
+ 
+    ok( ($x, $err) = new Compress::Raw::Zlib::Deflate ( 
+            WindowBits => WANT_GZIP ,
+            AppendOutput => 1
+        ), "Create deflate object" );
+    ok $x, "Compress::Raw::Zlib::Deflate ok" ;
+    cmp_ok $err, '==', Z_OK, "status is Z_OK" ;
+ 
+    $status = $x->deflate($hello, $X) ;
+    cmp_ok $status, '==', Z_OK, "deflate returned Z_OK" ;
+    
+    cmp_ok  $x->flush($X), '==', Z_OK, "flush returned Z_OK" ;
+     
+    my ($k, $GOT); 
+    ($k, $err) = new Compress::Raw::Zlib::Inflate( 
+            WindowBits => WANT_GZIP ,
+            ConsumeInput => 0 ,
+            AppendOutput => 1);
+    ok $k, "Compress::Raw::Zlib::Inflate WANT_GZIP ok" ;
+    cmp_ok $err, '==', Z_OK, "status is Z_OK" ;
+ 
+    $status = $k->inflate($X, $GOT) ;
+    cmp_ok $status, '==', Z_STREAM_END, "Got Z_STREAM_END" ;
+    is $GOT, $hello, "uncompressed data matches ok" ;
+
+    $GOT = '';
+    ($k, $err) = new Compress::Raw::Zlib::Inflate( 
+            WindowBits => WANT_GZIP_OR_ZLIB ,
+            AppendOutput => 1);
+    ok $k, "Compress::Raw::Zlib::Inflate WANT_GZIP_OR_ZLIB ok" ;
+    cmp_ok $err, '==', Z_OK, "status is Z_OK" ;
+ 
+    $status = $k->inflate($X, $GOT) ;
+    cmp_ok $status, '==', Z_STREAM_END, "Got Z_STREAM_END" ;
+    is $GOT, $hello, "uncompressed data matches ok" ;
+}
+
+{
+
+    title "gzip error mode";
+    # Create gzip -
+    # read with no special windowbits setting - this will fail
+    # then read with WANT_GZIP_OR_ZLIB - thi swill work
+    # ================
+
+    my $hello = "I am a HAL 9000 computer" ;
+    my ($err, $x, $X, $status); 
+ 
+    ok( ($x, $err) = new Compress::Raw::Zlib::Deflate ( 
+            WindowBits => WANT_GZIP ,
+            AppendOutput => 1
+        ), "Create deflate object" );
+    ok $x, "Compress::Raw::Zlib::Deflate ok" ;
+    cmp_ok $err, '==', Z_OK, "status is Z_OK" ;
+ 
+    $status = $x->deflate($hello, $X) ;
+    cmp_ok $status, '==', Z_OK, "deflate returned Z_OK" ;
+    
+    cmp_ok  $x->flush($X), '==', Z_OK, "flush returned Z_OK" ;
+     
+    my ($k, $GOT); 
+    ($k, $err) = new Compress::Raw::Zlib::Inflate( 
+            WindowBits => MAX_WBITS ,
+            ConsumeInput => 0 ,
+            AppendOutput => 1);
+    ok $k, "Compress::Raw::Zlib::Inflate WANT_GZIP ok" ;
+    cmp_ok $err, '==', Z_OK, "status is Z_OK" ;
+ 
+    $status = $k->inflate($X, $GOT) ;
+    cmp_ok $status, '==', Z_DATA_ERROR, "Got Z_DATA_ERROR" ;
+
+    $GOT = '';
+    ($k, $err) = new Compress::Raw::Zlib::Inflate( 
+            WindowBits => WANT_GZIP_OR_ZLIB ,
+            AppendOutput => 1);
+    ok $k, "Compress::Raw::Zlib::Inflate WANT_GZIP_OR_ZLIB ok" ;
+    cmp_ok $err, '==', Z_OK, "status is Z_OK" ;
+ 
+    $status = $k->inflate($X, $GOT) ;
+    cmp_ok $status, '==', Z_STREAM_END, "Got Z_STREAM_END" ;
+    is $GOT, $hello, "uncompressed data matches ok" ;
+}
+
+{
+
+    title "gzip/zlib error mode";
+    # Create zlib -
+    # read with no WANT_GZIP windowbits setting - this will fail
+    # then read with WANT_GZIP_OR_ZLIB - thi swill work
+    # ================
+
+    my $hello = "I am a HAL 9000 computer" ;
+    my ($err, $x, $X, $status); 
+ 
+    ok( ($x, $err) = new Compress::Raw::Zlib::Deflate ( 
+            AppendOutput => 1
+        ), "Create deflate object" );
+    ok $x, "Compress::Raw::Zlib::Deflate ok" ;
+    cmp_ok $err, '==', Z_OK, "status is Z_OK" ;
+ 
+    $status = $x->deflate($hello, $X) ;
+    cmp_ok $status, '==', Z_OK, "deflate returned Z_OK" ;
+    
+    cmp_ok  $x->flush($X), '==', Z_OK, "flush returned Z_OK" ;
+     
+    my ($k, $GOT); 
+    ($k, $err) = new Compress::Raw::Zlib::Inflate( 
+            WindowBits => WANT_GZIP ,
+            ConsumeInput => 0 ,
+            AppendOutput => 1);
+    ok $k, "Compress::Raw::Zlib::Inflate WANT_GZIP ok" ;
+    cmp_ok $err, '==', Z_OK, "status is Z_OK" ;
+ 
+    $status = $k->inflate($X, $GOT) ;
+    cmp_ok $status, '==', Z_DATA_ERROR, "Got Z_DATA_ERROR" ;
+
+    $GOT = '';
+    ($k, $err) = new Compress::Raw::Zlib::Inflate( 
+            WindowBits => WANT_GZIP_OR_ZLIB ,
+            AppendOutput => 1);
+    ok $k, "Compress::Raw::Zlib::Inflate WANT_GZIP_OR_ZLIB ok" ;
+    cmp_ok $err, '==', Z_OK, "status is Z_OK" ;
+ 
+    $status = $k->inflate($X, $GOT) ;
+    cmp_ok $status, '==', Z_STREAM_END, "Got Z_STREAM_END" ;
+    is $GOT, $hello, "uncompressed data matches ok" ;
+}
+
 exit if $] < 5.006 ;
 
 title 'Looping Append test with substr output - substr the end of the string';
diff -urN perl-5.10.0.orig/ext/Compress/Raw/Zlib/t/09limitoutput.t perl-5.10.0/ext/Compress/Raw/Zlib/t/09limitoutput.t
--- perl-5.10.0.orig/ext/Compress/Raw/Zlib/t/09limitoutput.t	1970-01-01 01:00:00.000000000 +0100
+++ perl-5.10.0/ext/Compress/Raw/Zlib/t/09limitoutput.t	2009-03-25 12:14:56.000000000 +0100
@@ -0,0 +1,129 @@
+BEGIN {
+    if ($ENV{PERL_CORE}) {
+	chdir 't' if -d 't';
+	@INC = ("../lib", "lib/compress");
+    }
+}
+
+use lib qw(t t/compress);
+use strict;
+use warnings;
+use bytes;
+
+use Test::More ;
+use CompTestUtils;
+
+BEGIN 
+{ 
+    # use Test::NoWarnings, if available
+    my $extra = 0 ;
+    $extra = 1
+        if eval { require Test::NoWarnings ;  import Test::NoWarnings; 1 };
+
+    plan tests => 98 + $extra ;
+
+    use_ok('Compress::Raw::Zlib', 2) ; 
+}
+
+
+
+my $hello = "I am a HAL 9000 computer" x 2001;
+my $tmp = $hello ;
+
+my ($err, $x, $X, $status); 
+
+ok( ($x, $err) = new Compress::Raw::Zlib::Deflate (-AppendOutput => 1));
+ok $x ;
+cmp_ok $err, '==', Z_OK, "  status is Z_OK" ;
+
+my $out ;
+$status = $x->deflate($tmp, $out) ;
+cmp_ok $status, '==', Z_OK, "  status is Z_OK" ;
+
+cmp_ok $x->flush($out), '==', Z_OK, "  flush returned Z_OK" ;
+     
+     
+sub getOut { my $x = ''; return \$x }
+
+for my $bufsize (1, 2, 3, 13, 4096, 1024*10)
+{
+    print "#\n#Bufsize $bufsize\n#\n";
+    $tmp = $out;
+
+    my $k;
+    ok(($k, $err) = new Compress::Raw::Zlib::Inflate( AppendOutput => 1,
+                                                      LimitOutput => 1,
+                                                      Bufsize => $bufsize
+                                                    ));
+    ok $k ;
+    cmp_ok $err, '==', Z_OK, "  status is Z_OK" ;
+ 
+    ok ! defined $k->msg(), "  no msg" ;
+    is $k->total_in(), 0, "  total_in == 0" ;
+    is $k->total_out(), 0, "  total_out == 0" ;
+    my $GOT = getOut();
+    my $prev;
+    my $deltaOK = 1;
+    my $looped = 0;
+    while (length $tmp)
+    {
+        ++ $looped;
+        my $prev = length $GOT;
+        $status = $k->inflate($tmp, $GOT) ;
+        last if $status == Z_STREAM_END || $status == Z_DATA_ERROR || $status == Z_STREAM_ERROR ;
+        $deltaOK = 0 if length($GOT) - $prev > $bufsize;
+    }
+     
+    ok $deltaOK, "  Output Delta never > $bufsize";
+    cmp_ok $looped, '>=', 1, "  looped $looped";
+    is length($tmp), 0, "  length of input buffer is zero";
+
+    cmp_ok $status, '==', Z_STREAM_END, "  status is Z_STREAM_END" ;
+    is $$GOT, $hello, "  got expected output" ;
+    ok ! defined $k->msg(), "  no msg" ;
+    is $k->total_in(), length $out, "  length total_in ok" ;
+    is $k->total_out(), length $hello, "  length total_out ok " .  $k->total_out() ;
+}
+
+sub getit
+{
+    my $obj = shift ;
+    my $input = shift;
+    
+    my $data ;
+    1 while $obj->inflate($input, $data) != Z_STREAM_END ;
+    return \$data ;
+}
+
+{
+    title "regression test";
+    
+    my ($err, $x, $X, $status); 
+    
+    ok( ($x, $err) = new Compress::Raw::Zlib::Deflate (-AppendOutput => 1));
+    ok $x ;
+    cmp_ok $err, '==', Z_OK, "  status is Z_OK" ;
+
+    my $line1 = ("abcdefghijklmnopq" x 1000) . "\n" ;
+    my $line2 = "second line\n" ;
+    my $text = $line1 . $line2 ;
+    my $tmp = $text;
+   
+    my $out ;
+    $status = $x->deflate($tmp, $out) ;
+    cmp_ok $status, '==', Z_OK, "  status is Z_OK" ;
+    
+    cmp_ok $x->flush($out), '==', Z_OK, "  flush returned Z_OK" ;
+
+    my $k;
+    ok(($k, $err) = new Compress::Raw::Zlib::Inflate( AppendOutput => 1,
+                                                      LimitOutput => 1
+                                                    ));
+
+                                                        
+    my $c = getit($k, $out);
+    is $$c, $text;
+    
+                                              
+}
+

perl-update-IO-Compress-Base.patch:
 ext/IO_Compress_Base/Changes                            |   68 +++++++
 ext/IO_Compress_Base/Makefile.PL                        |    6 
 ext/IO_Compress_Base/README                             |   42 ----
 ext/IO_Compress_Base/lib/File/GlobMapper.pm             |   20 --
 ext/IO_Compress_Base/lib/IO/Compress/Base.pm            |   47 +---
 ext/IO_Compress_Base/lib/IO/Compress/Base/Common.pm     |   51 ++++-
 ext/IO_Compress_Base/lib/IO/Uncompress/AnyUncompress.pm |  152 ++--------------
 ext/IO_Compress_Base/lib/IO/Uncompress/Base.pm          |   85 ++++++--
 ext/IO_Compress_Base/t/01misc.t                         |   38 +++-
 t/lib/compress/CompTestUtils.pm                         |   20 ++
 t/lib/compress/destroy.pl                               |   39 ++++
 t/lib/compress/generic.pl                               |   19 --
 12 files changed, 318 insertions(+), 269 deletions(-)

--- NEW FILE perl-update-IO-Compress-Base.patch ---
IO-Compress-Base-2.015
(omitting changes to private/MakeUtil.pm)

diff -urN perl-5.10.0.orig/ext/IO_Compress_Base/Changes perl-5.10.0/ext/IO_Compress_Base/Changes
--- perl-5.10.0.orig/ext/IO_Compress_Base/Changes	2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/IO_Compress_Base/Changes	2009-12-01 11:17:37.000000000 +0100
@@ -1,6 +1,74 @@
 CHANGES
 -------
 
+  2.015 3 September 2008
+
+      * Makefile.PL
+        Backout changes made in 2.014
+
+  2.014 2 September 2008
+
+      * Makefile.PL
+        Updated to check for indirect dependencies.
+
+  2.013 18 July 2008
+
+      * IO::Compress::Base 
+        - Allow IO::Compress::Base::Parameters::parse to accept an IO::Compress::Base::Parameters object.
+
+  2.012 15 July 2008
+
+      * IO::Compress::Base 
+        - Silenced an uninitialised value warning when reading a line
+          at a time from a zip file where the content uses ZIP_CM_STORE. 
+          [Problem spotted & fixed by Jeff Holt]
+
+      * IO::Compress::Base & IO::Uncompress::Base
+        - local-ise $!, $? et al in the DESTROY methods.
+          
+  2.011 17 May 2008
+
+      * IO::Compress::Base
+        - Fixed problem that prevented the creation of a zip file that
+          contained more than one compression method.
+
+      * IO::Compress::Base::Common
+        - The private Validator class in this module clashes with another
+          CPAN module. Moved Validator into the IO::Compress::Base::Common
+          namespace.
+          [RT #35954]
+
+  2.010 5 May 2008
+
+      * Fixed problem that meant Perl 5.10 could not upgrade this module.
+        [RT #35342]
+
+  2.009 20 April 2008
+
+      * Removed the alpha status from File::GlobMapper
+      
+      * IO::Compress::Base 
+        When writing output never output a zero length buffer.
+        Done to improve interoperability with other tied filenandle
+        modules.
+
+      * Changed IO::Uncompress::Base to not use the offset parameter of
+        the read method when reading from a filehandle. 
+
+        The object returned from Net::FTP::retr implements a non-standard
+        read method. The third parameter is used for a timeout value
+        rather than an offset.  
+        [rt.cpan#33231]
+        
+      * Changed IO::Uncompress::Base to not use the eof method when
+        reading from a filehandle. 
+
+        The object returned from Net::FTP::retr implements both the read
+        method and the eof method. Unfortunately the implementation of
+        the read method uses non-buffered IO (by using sysread) while
+        the eof method uses buffered IO. Mixing buffered and non-buffered
+        IO results in data corruption.
+
   2.008 2 November 2007
 
       * Minor documentation changes in README
diff -urN perl-5.10.0.orig/ext/IO_Compress_Base/Makefile.PL perl-5.10.0/ext/IO_Compress_Base/Makefile.PL
--- perl-5.10.0.orig/ext/IO_Compress_Base/Makefile.PL	2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/IO_Compress_Base/Makefile.PL	2009-12-01 11:17:37.000000000 +0100
@@ -37,6 +37,12 @@
 
     INSTALLDIRS => ($] >= 5.009 ? 'perl' : 'site'),
 
+    (
+    $] >= 5.009 && ! $ENV{PERL_CORE}
+        ? (INST_LIB    => 'blib/arch')
+        : ()
+    ),
+
     ((ExtUtils::MakeMaker->VERSION() gt '6.30') ?
         ('LICENSE'  => 'perl')         : ()),
     
diff -urN perl-5.10.0.orig/ext/IO_Compress_Base/README perl-5.10.0/ext/IO_Compress_Base/README
--- perl-5.10.0.orig/ext/IO_Compress_Base/README	2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/IO_Compress_Base/README	2009-12-01 11:17:37.000000000 +0100
@@ -1,42 +1,28 @@
 
                              IO-Compress-Base
 
-                             Version 2.008
+                             Version 2.015
 
-                             2nd November 2007
+                            2nd September 2008
 
-
-       Copyright (c) 2005-2007 Paul Marquess. All rights reserved.
+       Copyright (c) 2005-2008 Paul Marquess. All rights reserved.
           This program is free software; you can redistribute it
            and/or modify it under the same terms as Perl itself.
 
-
-
-
 DESCRIPTION
 -----------
 
-
 This module is the base class for all IO::Compress and IO::Uncompress
 modules.
 
-
-
-
-
 PREREQUISITES
 -------------
 
 Before you can build IO-Compress-Base you need to have the following
 installed on your system:
 
-
     * Perl 5.004 or better. 
 
-
-
-
-
 BUILDING THE MODULE
 -------------------
 
@@ -47,8 +33,6 @@
     make
     make test
 
-
-
 INSTALLATION
 ------------
 
@@ -56,24 +40,9 @@
 
     make install
 
-
-
-
-
 TROUBLESHOOTING
 ---------------
 
-
-
-
-
-
-
-
-
-
-
-
 FEEDBACK
 --------
 
@@ -107,9 +76,7 @@
         If you haven't installed IO-Compress-Base then search IO::Compress::Base.pm
         for a line like this:
 
-          $VERSION = "2.008" ;
-
-
+          $VERSION = "2.015" ;
 
  2. If you are having problems building IO-Compress-Base, send me a
     complete log of what happened. Start by unpacking the IO-Compress-Base
@@ -120,5 +87,4 @@
         make
         make test TEST_VERBOSE=1          
 
-
 Paul Marquess <pmqs at cpan.org>
diff -urN perl-5.10.0.orig/ext/IO_Compress_Base/lib/File/GlobMapper.pm perl-5.10.0/ext/IO_Compress_Base/lib/File/GlobMapper.pm
--- perl-5.10.0.orig/ext/IO_Compress_Base/lib/File/GlobMapper.pm	2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/IO_Compress_Base/lib/File/GlobMapper.pm	2009-12-01 11:17:37.000000000 +0100
@@ -26,7 +26,7 @@
 our ($Error);
 
 our ($VERSION, @EXPORT_OK);
-$VERSION = '0.000_02';
+$VERSION = '1.000';
 @EXPORT_OK = qw( globmap );
 
 
@@ -389,24 +389,6 @@
 
 =head1 DESCRIPTION
 
-B<WARNING Alpha Release Alert!> 
-
-=over 5
-
-=item * This code is a work in progress. 
-
-=item * There are known bugs. 
-
-=item * The interface defined here is tentative. 
-
-=item * There are portability issues. 
-
-=item * Do not use in production code.
-
-=item * Consider yourself warned!
-
-=back
-
 This module needs Perl5.005 or better.
 
 This module takes the existing C<File::Glob> module as a starting point and
diff -urN perl-5.10.0.orig/ext/IO_Compress_Base/lib/IO/Compress/Base/Common.pm perl-5.10.0/ext/IO_Compress_Base/lib/IO/Compress/Base/Common.pm
--- perl-5.10.0.orig/ext/IO_Compress_Base/lib/IO/Compress/Base/Common.pm	2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/IO_Compress_Base/lib/IO/Compress/Base/Common.pm	2009-12-01 11:17:37.000000000 +0100
@@ -11,7 +11,7 @@
 require Exporter;
 our ($VERSION, @ISA, @EXPORT, %EXPORT_TAGS, $HAS_ENCODE);
 @ISA = qw(Exporter);
-$VERSION = '2.008';
+$VERSION = '2.015';
 
 @EXPORT = qw( isaFilehandle isaFilename whatIsInput whatIsOutput 
               isaFileGlobString cleanFileGlobString oneTarget
@@ -192,7 +192,7 @@
     return $_[0] =~ /^(code|handle|buffer|filename)$/;
 }
 
-sub Validator::new
+sub IO::Compress::Base::Validator::new
 {
     my $class = shift ;
 
@@ -320,7 +320,7 @@
     return $obj ;
 }
 
-sub Validator::saveErrorString
+sub IO::Compress::Base::Validator::saveErrorString
 {
     my $self   = shift ;
     ${ $self->{Error} } = shift ;
@@ -328,7 +328,7 @@
     
 }
 
-sub Validator::croakError
+sub IO::Compress::Base::Validator::croakError
 {
     my $self   = shift ;
     $self->saveErrorString($_[0]);
@@ -337,7 +337,7 @@
 
 
 
-sub Validator::validateInputFilenames
+sub IO::Compress::Base::Validator::validateInputFilenames
 {
     my $self = shift ;
 
@@ -367,7 +367,7 @@
     return 1 ;
 }
 
-sub Validator::validateInputArray
+sub IO::Compress::Base::Validator::validateInputArray
 {
     my $self = shift ;
 
@@ -398,7 +398,7 @@
     return 1 ;
 }
 
-#sub Validator::validateHash
+#sub IO::Compress::Base::Validator::validateHash
 #{
 #    my $self = shift ;
 #    my $href = shift ;
@@ -485,7 +485,11 @@
 
     my $sub = (caller($level + 1))[3] ;
     local $Carp::CarpLevel = 1 ;
-    my $p = new IO::Compress::Base::Parameters() ;
+    
+    return $_[1]
+        if @_ == 2 && defined $_[1] && UNIVERSAL::isa($_[1], "IO::Compress::Base::Parameters");
+    
+    my $p = new IO::Compress::Base::Parameters() ;            
     $p->parse(@_)
         or croak "$sub: $p->{Error}" ;
 
@@ -534,6 +538,7 @@
 
     my $got = $self->{Got} ;
     my $firstTime = keys %{ $got } == 0 ;
+    my $other;
 
     my (@Bad) ;
     my @entered = () ;
@@ -544,7 +549,8 @@
         @entered = () ;
     }
     elsif (@_ == 1) {
-        my $href = $_[0] ;    
+        my $href = $_[0] ;
+    
         return $self->setError("Expected even number of parameters, got 1")
             if ! defined $href or ! ref $href or ref $href ne "HASH" ;
  
@@ -559,8 +565,13 @@
             if $count % 2 != 0 ;
         
         for my $i (0.. $count / 2 - 1) {
-            push @entered, $_[2* $i] ;
-            push @entered, \$_[2* $i+1] ;
+            if ($_[2 * $i] eq '__xxx__') {
+                $other = $_[2 * $i + 1] ;
+            }
+            else {
+                push @entered, $_[2 * $i] ;
+                push @entered, \$_[2 * $i + 1] ;
+            }
         }
     }
 
@@ -588,6 +599,24 @@
     }
 
     my %parsed = ();
+    
+    if ($other) 
+    {
+        for my $key (keys %$default)  
+        {
+            my $canonkey = lc $key;
+            if ($other->parsed($canonkey))
+            {
+                my $value = $other->value($canonkey);
+#print "SET '$canonkey' to $value [$$value]\n";
+                ++ $parsed{$canonkey};
+                $got->{$canonkey}[OFF_PARSED]  = 1;
+                $got->{$canonkey}[OFF_DEFAULT] = $value;
+                $got->{$canonkey}[OFF_FIXED]   = $value;
+            }
+        }
+    }
+    
     for my $i (0.. @entered / 2 - 1) {
         my $key = $entered[2* $i] ;
         my $value = $entered[2* $i+1] ;
diff -urN perl-5.10.0.orig/ext/IO_Compress_Base/lib/IO/Compress/Base.pm perl-5.10.0/ext/IO_Compress_Base/lib/IO/Compress/Base.pm
--- perl-5.10.0.orig/ext/IO_Compress_Base/lib/IO/Compress/Base.pm	2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/IO_Compress_Base/lib/IO/Compress/Base.pm	2009-12-01 11:17:37.000000000 +0100
@@ -6,7 +6,7 @@
 use strict ;
 use warnings;
 
-use IO::Compress::Base::Common 2.008 ;
+use IO::Compress::Base::Common 2.015 ;
 
 use IO::File ;
 use Scalar::Util qw(blessed readonly);
@@ -20,7 +20,7 @@
 our (@ISA, $VERSION);
 @ISA    = qw(Exporter IO::File);
 
-$VERSION = '2.008';
+$VERSION = '2.015';
 
 #Can't locate object method "SWASHNEW" via package "utf8" (perhaps you forgot to load "utf8"?) at .../ext/Compress-Zlib/Gzip/blib/lib/Compress/Zlib/Common.pm line 16.
 
@@ -120,12 +120,14 @@
         &{ *$self->{FilterEnvelope} }();
     }
 
-    if ( defined *$self->{FH} ) {
-        defined *$self->{FH}->write( $data, length $data )
-          or return $self->saveErrorString(0, $!, $!); 
-    }
-    else {
-        ${ *$self->{Buffer} } .= $data ;
+    if (length $data) {
+        if ( defined *$self->{FH} ) {
+                defined *$self->{FH}->write( $data, length $data )
+                or return $self->saveErrorString(0, $!, $!); 
+        }
+        else {
+                ${ *$self->{Buffer} } .= $data ;
+        }
     }
 
     return 1;
@@ -234,7 +236,7 @@
     my $status ;
     if (! $merge)
     {
-        *$obj->{Compress} = $obj->mkComp($class, $got)
+        *$obj->{Compress} = $obj->mkComp($got)
             or return undef;
         
         *$obj->{UnCompSize} = new U64 ;
@@ -321,7 +323,7 @@
     my $haveOut = @_ ;
     my $output = shift ;
 
-    my $x = new Validator($class, *$obj->{Error}, $name, $input, $output)
+    my $x = new IO::Compress::Base::Validator($class, *$obj->{Error}, $name, $input, $output)
         or return undef ;
 
     push @_, $output if $haveOut && $x->{Hash};
@@ -545,6 +547,8 @@
 sub DESTROY
 {
     my $self = shift ;
+    local ($., $@, $!, $^E, $?);
+    
     $self->close() ;
 
     # TODO - memory leak with 5.8.0 - this isn't called until 
@@ -697,15 +701,13 @@
     $self->ckParams($got)
         or $self->croakError("newStream: $self->{Error}");
 
+    *$self->{Compress} = $self->mkComp($got)
+        or return 0;
+
     *$self->{Header} = $self->mkHeader($got) ;
     $self->output(*$self->{Header} )
         or return 0;
     
-    my $status = $self->reset() ;
-    return $self->saveErrorString(0, *$self->{Compress}{Error}, 
-                                  *$self->{Compress}{ErrorNo})
-        if $status == STATUS_ERROR;
-
     *$self->{UnCompSize}->reset();
     *$self->{CompSize}->reset();
 
@@ -939,23 +941,17 @@
 
 =head1 NAME
 
-
 IO::Compress::Base - Base Class for IO::Compress modules 
 
-
 =head1 SYNOPSIS
 
     use IO::Compress::Base ;
 
 =head1 DESCRIPTION
 
-
 This module is not intended for direct use in application code. Its sole
 purpose if to to be sub-classed by IO::Compress modules.
 
-
-
-
 =head1 SEE ALSO
 
 L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress>
@@ -966,25 +962,18 @@
 L<Archive::Tar|Archive::Tar>,
 L<IO::Zlib|IO::Zlib>
 
-
-
-
-
 =head1 AUTHOR
 
 This module was written by Paul Marquess, F<pmqs at cpan.org>. 
 
-
-
 =head1 MODIFICATION HISTORY
 
 See the Changes file.
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (c) 2005-2007 Paul Marquess. All rights reserved.
+Copyright (c) 2005-2008 Paul Marquess. All rights reserved.
 
 This program is free software; you can redistribute it and/or
 modify it under the same terms as Perl itself.
 
-
diff -urN perl-5.10.0.orig/ext/IO_Compress_Base/lib/IO/Uncompress/AnyUncompress.pm perl-5.10.0/ext/IO_Compress_Base/lib/IO/Uncompress/AnyUncompress.pm
--- perl-5.10.0.orig/ext/IO_Compress_Base/lib/IO/Uncompress/AnyUncompress.pm	2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/IO_Compress_Base/lib/IO/Uncompress/AnyUncompress.pm	2009-12-01 11:17:37.000000000 +0100
@@ -4,16 +4,16 @@
 use warnings;
 use bytes;
 
-use IO::Compress::Base::Common 2.008 qw(createSelfTiedObject);
+use IO::Compress::Base::Common 2.015 qw(createSelfTiedObject);
 
-use IO::Uncompress::Base 2.008 ;
+use IO::Uncompress::Base 2.015 ;
 
 
 require Exporter ;
 
 our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyUncompressError);
 
-$VERSION = '2.008';
+$VERSION = '2.015';
 $AnyUncompressError = '';
 
 @ISA = qw( Exporter IO::Uncompress::Base );
@@ -27,18 +27,18 @@
 
 BEGIN
 {
-   eval ' use IO::Uncompress::Adapter::Inflate 2.008 ;';
-   eval ' use IO::Uncompress::Adapter::Bunzip2 2.008 ;';
-   eval ' use IO::Uncompress::Adapter::LZO 2.008 ;';
-   eval ' use IO::Uncompress::Adapter::Lzf 2.008 ;';
-
-   eval ' use IO::Uncompress::Bunzip2 2.008 ;';
-   eval ' use IO::Uncompress::UnLzop 2.008 ;';
-   eval ' use IO::Uncompress::Gunzip 2.008 ;';
-   eval ' use IO::Uncompress::Inflate 2.008 ;';
-   eval ' use IO::Uncompress::RawInflate 2.008 ;';
-   eval ' use IO::Uncompress::Unzip 2.008 ;';
-   eval ' use IO::Uncompress::UnLzf 2.008 ;';
+   eval ' use IO::Uncompress::Adapter::Inflate 2.015 ;';
+   eval ' use IO::Uncompress::Adapter::Bunzip2 2.015 ;';
+   eval ' use IO::Uncompress::Adapter::LZO 2.015 ;';
+   eval ' use IO::Uncompress::Adapter::Lzf 2.015 ;';
+
+   eval ' use IO::Uncompress::Bunzip2 2.015 ;';
+   eval ' use IO::Uncompress::UnLzop 2.015 ;';
+   eval ' use IO::Uncompress::Gunzip 2.015 ;';
+   eval ' use IO::Uncompress::Inflate 2.015 ;';
+   eval ' use IO::Uncompress::RawInflate 2.015 ;';
+   eval ' use IO::Uncompress::Unzip 2.015 ;';
+   eval ' use IO::Uncompress::UnLzf 2.015 ;';
 }
 
 sub new
@@ -56,7 +56,7 @@
 
 sub getExtraParams
 {
-    use IO::Compress::Base::Common 2.008 qw(:Parse);
+    use IO::Compress::Base::Common 2.015 qw(:Parse);
     return ( 'RawInflate' => [1, 1, Parse_boolean,  0] ) ;
 }
 
@@ -75,7 +75,6 @@
 sub mkUncomp
 {
     my $self = shift ;
-    my $class = shift ;
     my $got = shift ;
 
     my $magic ;
@@ -188,10 +187,8 @@
 
 =head1 NAME
 
-
 IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2 or lzop file/buffer
 
-
 =head1 SYNOPSIS
 
     use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;
@@ -235,10 +232,8 @@
     eof($z)
     close($z)
 
-
 =head1 DESCRIPTION
 
-
 This module provides a Perl interface that allows the reading of
 files/buffers that have been compressed with a variety of compression
 libraries.
@@ -266,9 +261,6 @@
 The module will auto-detect which, if any, of the supported
 compression formats is being used.
 
-
-
-
 =head1 Functional Interface
 
 A top-level function, C<anyuncompress>, is provided to carry out
@@ -281,14 +273,10 @@
     anyuncompress $input => $output [,OPTS] 
         or die "anyuncompress failed: $AnyUncompressError\n";
 
-
-
 The functional interface needs Perl5.005 or better.
 
-
 =head2 anyuncompress $input => $output [, OPTS]
 
-
 C<anyuncompress> expects at least two parameters, C<$input> and C<$output>.
 
 =head3 The C<$input> parameter
@@ -327,8 +315,6 @@
 The complete array will be walked to ensure that it only
 contains valid filenames before any data is uncompressed.
 
-
-
 =item An Input FileGlob string
 
 If C<$input> is a string that is delimited by the characters "<" and ">"
@@ -339,13 +325,10 @@
 
 See L<File::GlobMapper|File::GlobMapper> for more details.
 
-
 =back
 
 If the C<$input> parameter is any other type, C<undef> will be returned.
 
-
-
 =head3 The C<$output> parameter
 
 The parameter C<$output> is used to control the destination of the
@@ -365,14 +348,11 @@
 will be written to it.
 The string '-' can be used as an alias for standard output.
 
-
 =item A scalar reference 
 
 If C<$output> is a scalar reference, the uncompressed data will be
 stored in C<$$output>.
 
-
-
 =item An Array Reference
 
 If C<$output> is an array reference, the uncompressed data will be
@@ -391,20 +371,13 @@
 
 If the C<$output> parameter is any other type, C<undef> will be returned.
 
-
-
 =head2 Notes
 
-
 When C<$input> maps to multiple compressed files/buffers and C<$output> is
 a single file/buffer, after uncompression C<$output> will contain a
 concatenation of all the uncompressed data from each of the input
 files/buffers.
 
-
-
-
-
 =head2 Optional Parameters
 
 Unless specified below, the optional parameters for C<anyuncompress>,
@@ -424,7 +397,6 @@
 
 This parameter defaults to 0.
 
-
 =item C<< BinModeOut => 0|1 >>
 
 When writing to a file or filehandle, set C<binmode> before writing to the
@@ -432,26 +404,17 @@
 
 Defaults to 0.
 
-
-
-
-
 =item C<< Append => 0|1 >>
 
 TODO
 
 =item C<< MultiStream => 0|1 >>
 
-
 If the input file/buffer contains multiple compressed data streams, this
 option will uncompress the whole lot as a single data stream.
 
 Defaults to 0.
 
-
-
-
-
 =item C<< TrailingData => $scalar >>
 
 Returns the data, if any, that is present immediately after the compressed
@@ -471,19 +434,12 @@
 
 Don't bother using C<trailingData> if the input is a filename.
 
-
-
 If you know the length of the compressed data stream before you start
 uncompressing, you can avoid having to use C<trailingData> by setting the
 C<InputLength> option.
 
-
-
 =back
 
-
-
-
 =head2 Examples
 
 To read the contents of the file C<file1.txt.Compressed> and write the
@@ -498,7 +454,6 @@
     anyuncompress $input => $output
         or die "anyuncompress failed: $AnyUncompressError\n";
 
-
 To read from an existing Perl filehandle, C<$input>, and write the
 uncompressed data to a buffer, C<$buffer>.
 
@@ -542,7 +497,6 @@
 
 The format of the constructor for IO::Uncompress::AnyUncompress is shown below
 
-
     my $z = new IO::Uncompress::AnyUncompress $input [OPTS]
         or die "IO::Uncompress::AnyUncompress failed: $AnyUncompressError\n";
 
@@ -574,7 +528,6 @@
 read from it.
 The string '-' can be used as an alias for standard input.
 
-
 =item A scalar reference 
 
 If C<$input> is a scalar reference, the compressed data will be read from
@@ -584,7 +537,6 @@
 
 =head2 Constructor Options
 
-
 The option names defined below are case insensitive and can be optionally
 prefixed by a '-'.  So all of the following are valid
 
@@ -608,8 +560,6 @@
 
 =item C<< MultiStream => 0|1 >>
 
-
-
 Allows multiple concatenated compressed streams to be treated as a single
 compressed stream. Decompression will stop once either the end of the
 file/buffer is reached, an error is encountered (premature eof, corrupt
@@ -618,7 +568,6 @@
 
 This parameter defaults to 0.
 
-
 =item C<< Prime => $string >>
 
 This option will uncompress the contents of C<$string> before processing the
@@ -660,8 +609,6 @@
 the file pointer will be left pointing to the first byte directly after the
 compressed data stream.
 
-
-
 This option defaults to off.
 
 =item C<< Append => 0|1 >>
@@ -678,24 +625,12 @@
 
 =item C<< Strict => 0|1 >>
 
-
-
 This option controls whether the extra checks defined below are used when
 carrying out the decompression. When Strict is on, the extra tests are
 carried out, when Strict is off they are not.
 
 The default for this option is off.
 
-
-
-
-
-
-
-
-
-
-
 =item C<< RawInflate => 0|1 >>
 
 When auto-detecting the compressed format, try to test for raw-deflate (RFC
@@ -707,11 +642,6 @@
 
 Defaults to 0.
 
-
-
-
-
-
 =back
 
 =head2 Examples
@@ -755,7 +685,6 @@
 Returns the number of uncompressed bytes written to C<$buffer>, zero if eof
 or a negative number on error.
 
-
 =head2 getline
 
 Usage is
@@ -770,7 +699,6 @@
 determine what constitutes an end of line. Paragraph mode, record mode and
 file slurp mode are all supported. 
 
-
 =head2 getc
 
 Usage is 
@@ -785,9 +713,6 @@
 
     $char = $z->ungetc($string)
 
-
-
-
 =head2 getHeaderInfo
 
 Usage is
@@ -799,9 +724,6 @@
 or hash references (in array context) that contains information about each
 of the header fields in the compressed data stream(s).
 
-
-
-
 =head2 tell
 
 Usage is
@@ -818,26 +740,17 @@
     $z->eof();
     eof($z);
 
-
-
 Returns true if the end of the compressed input stream has been reached.
 
-
-
 =head2 seek
 
     $z->seek($position, $whence);
     seek($z, $position, $whence);
 
-
-
-
 Provides a sub-set of the C<seek> functionality, with the restriction
 that it is only legal to seek forward in the input file/buffer.
 It is a fatal error to attempt to seek backward.
 
-
-
 The C<$whence> parameter takes one the usual values, namely SEEK_SET,
 SEEK_CUR or SEEK_END.
 
@@ -879,8 +792,6 @@
     $z->input_line_number()
     $z->input_line_number(EXPR)
 
-
-
 Returns the current uncompressed line number. If C<EXPR> is present it has
 the effect of setting the line number. Note that setting the line number
 does not change the current position within the file/buffer being read.
@@ -888,30 +799,25 @@
 The contents of C<$/> are used to to determine what constitutes a line
 terminator.
 
-
-
 =head2 fileno
 
     $z->fileno()
     fileno($z)
 
-If the C<$z> object is associated with a file or a filehandle, this method
-will return the underlying file descriptor.
+If the C<$z> object is associated with a file or a filehandle, C<fileno>
+will return the underlying file descriptor. Once the C<close> method is
+called C<fileno> will return C<undef>.
 
-If the C<$z> object is is associated with a buffer, this method will
-return undef.
+If the C<$z> object is is associated with a buffer, this method will return
+C<undef>.
 
 =head2 close
 
     $z->close() ;
     close $z ;
 
-
-
 Closes the output file/buffer. 
 
-
-
 For most versions of Perl this method will be automatically invoked if
 the IO::Uncompress::AnyUncompress object is destroyed (either explicitly or by the
 variable with the reference to the object going out of scope). The
@@ -930,9 +836,6 @@
 object was created, and the object is associated with a file, the
 underlying file will also be closed.
 
-
-
-
 =head2 nextStream
 
 Usage is
@@ -971,8 +874,6 @@
 
 Don't bother using C<trailingData> if the input is a filename.
 
-
-
 If you know the length of the compressed data stream before you start
 uncompressing, you can avoid having to use C<trailingData> by setting the
 C<InputLength> option in the constructor.
@@ -994,9 +895,6 @@
 
 =head1 EXAMPLES
 
-
-
-
 =head1 SEE ALSO
 
 L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>
@@ -1007,23 +905,17 @@
 L<Archive::Tar|Archive::Tar>,
 L<IO::Zlib|IO::Zlib>
 
-
-
-
-
 =head1 AUTHOR
 
 This module was written by Paul Marquess, F<pmqs at cpan.org>. 
 
-
-
 =head1 MODIFICATION HISTORY
 
 See the Changes file.
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (c) 2005-2007 Paul Marquess. All rights reserved.
+Copyright (c) 2005-2008 Paul Marquess. All rights reserved.
 
 This program is free software; you can redistribute it and/or
 modify it under the same terms as Perl itself.
diff -urN perl-5.10.0.orig/ext/IO_Compress_Base/lib/IO/Uncompress/Base.pm perl-5.10.0/ext/IO_Compress_Base/lib/IO/Uncompress/Base.pm
--- perl-5.10.0.orig/ext/IO_Compress_Base/lib/IO/Uncompress/Base.pm	2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/IO_Compress_Base/lib/IO/Uncompress/Base.pm	2009-12-01 11:17:37.000000000 +0100
@@ -9,12 +9,12 @@
 @ISA    = qw(Exporter IO::File);
 
 
-$VERSION = '2.008';
+$VERSION = '2.015';
 
 use constant G_EOF => 0 ;
 use constant G_ERR => -1 ;
 
-use IO::Compress::Base::Common 2.008 ;
+use IO::Compress::Base::Common 2.015 ;
 #use Parse::Parameters ;
 
 use IO::File ;
@@ -28,6 +28,7 @@
 #Exporter::export_ok_tags('all') ;
 
 
+
 sub smartRead
 {
     my $self = $_[0];
@@ -59,12 +60,21 @@
 
     my $get_size = $size - $offset ;
 
-    #if ( defined *$self->{InputLength} ) {
-    #    $get_size = min($get_size, *$self->{InputLengthRemaining});
-    #}
-
-    if (defined *$self->{FH})
-      { *$self->{FH}->read($$out, $get_size, $offset) }
+    if (defined *$self->{FH}) {
+        if ($offset) {
+            # Not using this 
+            #
+            #  *$self->{FH}->read($$out, $get_size, $offset);
+            #
+            # because the filehandle may not support the offset parameter
+            # An example is Net::FTP
+            my $tmp = '';
+            *$self->{FH}->read($tmp, $get_size) > 0 &&
+                (substr($$out, $offset) = $tmp);
+        }
+        else
+          { *$self->{FH}->read($$out, $get_size) }
+    }
     elsif (defined *$self->{InputEvent}) {
         my $got = 1 ;
         while (length $$out < $size) {
@@ -174,7 +184,24 @@
     return 0 if length *$self->{Prime} || *$self->{PushMode};
 
     if (defined *$self->{FH})
-     { *$self->{FH}->eof() }
+    {
+        # Could use
+        #
+        #  *$self->{FH}->eof() 
+        #
+        # here, but this can cause trouble if
+        # the filehandle is itself a tied handle, but it uses sysread.
+        # Then we get into mixing buffered & non-buffered IO, which will cause trouble
+
+        my $info = $self->getErrInfo();
+        
+        my $buffer = '';
+        my $status = $self->smartRead(\$buffer, 1);
+        $self->pushBack($buffer) if length $buffer;
+        $self->setErrInfo($info);
+        
+        return $status == 0 ;
+    }
     elsif (defined *$self->{InputEvent})
      { *$self->{EventEof} }
     else 
@@ -189,6 +216,22 @@
     ${ *$self->{Error} } = '' ;
 }
 
+sub getErrInfo
+{
+    my $self   = shift ;
+
+    return [ *$self->{ErrorNo}, ${ *$self->{Error} } ] ;
+}
+
+sub setErrInfo
+{
+    my $self   = shift ;
+    my $ref    = shift;
+
+    *$self->{ErrorNo}  =  $ref->[0] ;
+    ${ *$self->{Error} } = $ref->[1] ;
+}
+
 sub saveStatus
 {
     my $self   = shift ;
@@ -425,7 +468,7 @@
         return $obj
     }
 
-    my $status = $obj->mkUncomp($class, $got);
+    my $status = $obj->mkUncomp($got);
 
     return undef
         unless defined $status;
@@ -490,7 +533,7 @@
     my $output = shift ;
 
 
-    my $x = new Validator($class, *$obj->{Error}, $name, $input, $output)
+    my $x = new IO::Compress::Base::Validator($class, *$obj->{Error}, $name, $input, $output)
         or return undef ;
     
     push @_, $output if $haveOut && $x->{Hash};
@@ -813,7 +856,7 @@
         $self->postBlockChk($buffer, $before_len) == STATUS_OK
             or return G_ERR;
 
-        $buf_len = length($$buffer) - $before_len;
+        $buf_len = defined $$buffer ? length($$buffer) - $before_len : 0;
     
         *$self->{CompSize}->add($beforeC_len - length $temp_buf) ;
 
@@ -929,7 +972,7 @@
     my $magic = $self->ckMagic();
     #*$self->{EndStream} = 0 ;
 
-    if ( ! $magic) {
+    if ( ! defined $magic) {
         if (! *$self->{Transparent} )
         {
             *$self->{EndStream} = 1 ;
@@ -1247,6 +1290,8 @@
 sub DESTROY
 {
     my $self = shift ;
+    local ($., $@, $!, $^E, $?);
+
     $self->close() ;
 }
 
@@ -1372,23 +1417,17 @@
 
 =head1 NAME
 
-
 IO::Uncompress::Base - Base Class for IO::Uncompress modules 
 
-
 =head1 SYNOPSIS
 
     use IO::Uncompress::Base ;
 
 =head1 DESCRIPTION
 
-
 This module is not intended for direct use in application code. Its sole
 purpose if to to be sub-classed by IO::Unompress modules.
 
-
-
-
 =head1 SEE ALSO
 
 L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress>
@@ -1399,23 +1438,17 @@
 L<Archive::Tar|Archive::Tar>,
 L<IO::Zlib|IO::Zlib>
 
-
-
-
-
 =head1 AUTHOR
 
 This module was written by Paul Marquess, F<pmqs at cpan.org>. 
 
-
-
 =head1 MODIFICATION HISTORY
 
 See the Changes file.
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (c) 2005-2007 Paul Marquess. All rights reserved.
+Copyright (c) 2005-2008 Paul Marquess. All rights reserved.
 
 This program is free software; you can redistribute it and/or
 modify it under the same terms as Perl itself.
diff -urN perl-5.10.0.orig/ext/IO_Compress_Base/t/01misc.t perl-5.10.0/ext/IO_Compress_Base/t/01misc.t
--- perl-5.10.0.orig/ext/IO_Compress_Base/t/01misc.t	2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/IO_Compress_Base/t/01misc.t	2009-12-01 11:17:37.000000000 +0100
@@ -19,7 +19,7 @@
     $extra = 1
         if eval { require Test::NoWarnings ;  import Test::NoWarnings; 1 };
 
-    plan tests => 78 + $extra ;
+    plan tests => 88 + $extra ;
 
     use_ok('Scalar::Util');
     use_ok('IO::Compress::Base::Common');
@@ -95,13 +95,11 @@
     my $got = ParseParameters(1, {'Fred' => [1, 1, 0x1000000, 0]}, Fred => 'abc') ;
     is $got->value('Fred'), "abc", "other" ;
 
-    $got = ParseParameters(1, {'Fred' => [0, 1, Parse_any, undef]}, Fred =>
-undef) ;
+    $got = ParseParameters(1, {'Fred' => [0, 1, Parse_any, undef]}, Fred => undef) ;
     ok $got->parsed('Fred'), "undef" ;
     ok ! defined $got->value('Fred'), "undef" ;
 
-    $got = ParseParameters(1, {'Fred' => [0, 1, Parse_string, undef]}, Fred =>
-undef) ;
+    $got = ParseParameters(1, {'Fred' => [0, 1, Parse_string, undef]}, Fred => undef) ;
     ok $got->parsed('Fred'), "undef" ;
     is $got->value('Fred'), "", "empty string" ;
 
@@ -117,11 +115,41 @@
 
     ok $got->parsed('Fred'), "parsed" ;
     $xx_ref = $got->value('Fred');
+
     $$xx_ref = 666 ;
     is $xx, 666;
 
+    {
+        my $got1 = ParseParameters(1, {'Fred' => [1, 1, Parse_writable_scalar, undef]}, $got) ;
+        is $got1, $got, "Same object";
+    
+        ok $got1->parsed('Fred'), "parsed" ;
+        $xx_ref = $got1->value('Fred');
+        
+        $$xx_ref = 777 ;
+        is $xx, 777;
+    }
+    
+    my $got2 = ParseParameters(1, {'Fred' => [1, 1, Parse_writable_scalar, undef]}, '__xxx__' => $got) ;
+    isnt $got2, $got, "not the Same object";
+
+    ok $got2->parsed('Fred'), "parsed" ;
+    $xx_ref = $got2->value('Fred');
+    $$xx_ref = 888 ;
+    is $xx, 888;  
+      
+    my $other;
+    my $got3 = ParseParameters(1, {'Fred' => [1, 1, Parse_writable_scalar, undef]}, '__xxx__' => $got, Fred => \$other) ;
+    isnt $got3, $got, "not the Same object";
+
+    ok $got3->parsed('Fred'), "parsed" ;
+    $xx_ref = $got3->value('Fred');
+    $$xx_ref = 999 ;
+    is $other, 999;  
+    is $xx, 888;  
 }
 
+
 My::testParseParameters();
 
 
diff -urN perl-5.10.0.orig/t/lib/compress/CompTestUtils.pm perl-5.10.0/t/lib/compress/CompTestUtils.pm
--- perl-5.10.0.orig/t/lib/compress/CompTestUtils.pm	2007-12-18 11:47:08.000000000 +0100
+++ perl-5.10.0/t/lib/compress/CompTestUtils.pm	2009-12-01 11:18:49.000000000 +0100
@@ -203,6 +203,14 @@
     return readFile($filename) eq unpack("u", $uue) ;
 }
 
+sub isRawFormat
+{
+    my $class = shift;
+    my %raw = map { $_ => 1 } qw( RawDeflate );
+
+    return defined $raw{$class};
+}
+
 sub uncompressBuffer
 {
     my $compWith = shift ;
@@ -222,6 +230,8 @@
                     'IO::Compress::Lzop::lzop'               => 'IO::Uncompress::UnLzop',
                     'IO::Compress::Lzf'                      => 'IO::Uncompress::UnLzf' ,
                     'IO::Compress::Lzf::lzf'                 => 'IO::Uncompress::UnLzf',
+                    'IO::Compress::PPMd'                     => 'IO::Uncompress::UnPPMd' ,
+                    'IO::Compress::PPMd::ppmd'               => 'IO::Uncompress::UnPPMd',
                     'IO::Compress::DummyComp'                => 'IO::Uncompress::DummyUncomp',
                     'IO::Compress::DummyComp::dummycomp'     => 'IO::Uncompress::DummyUncomp',
                 );
@@ -265,6 +275,10 @@
                     'IO::Compress::Lzf::lzf'            => \$IO::Compress::Lzf::LzfError,
                     'IO::Uncompress::UnLzf'             => \$IO::Uncompress::UnLzf::UnLzfError,
                     'IO::Uncompress::UnLzf::unlzf'      => \$IO::Uncompress::UnLzf::UnLzfError,
+                    'IO::Compress::PPMd'                 => \$IO::Compress::PPMd::PPMdError,
+                    'IO::Compress::PPMd::ppmd'            => \$IO::Compress::PPMd::PPMdError,
+                    'IO::Uncompress::UnPPMd'             => \$IO::Uncompress::UnPPMd::UnPPMdError,
+                    'IO::Uncompress::UnPPMd::unppmd'      => \$IO::Uncompress::UnPPMd::UnPPMdError,
 
                     'IO::Compress::DummyComp'           => \$IO::Compress::DummyComp::DummyCompError,
                     'IO::Compress::DummyComp::dummycomp'=> \$IO::Compress::DummyComp::DummyCompError,
@@ -293,6 +307,8 @@
                     'IO::Uncompress::UnLzop'      => 'IO::Uncompress::UnLzop::unlzop',
                     'IO::Compress::Lzf'           => 'IO::Compress::Lzf::lzf',
                     'IO::Uncompress::UnLzf'       => 'IO::Uncompress::UnLzf::unlzf',
+                    'IO::Compress::PPMd'           => 'IO::Compress::PPMd::ppmd',
+                    'IO::Uncompress::UnPPMd'       => 'IO::Uncompress::UnPPMd::unppmd',
                     'IO::Compress::DummyComp'     => 'IO::Compress::DummyComp::dummyuncomp',
                     'IO::Uncompress::DummyUncomp' => 'IO::Uncompress::DummyUncomp::dummyuncomp',
                  );
@@ -319,6 +335,8 @@
                  'IO::Compress::Lzop'                    => 'IO::Uncompress::UnLzop',
                  'IO::Compress::Lzf::lzf'                => 'IO::Uncompress::UnLzf::unlzf',
                  'IO::Compress::Lzf'                     => 'IO::Uncompress::UnLzf',
+                 'IO::Compress::PPMd::ppmd'              => 'IO::Uncompress::UnPPMd::unppmd',
+                 'IO::Compress::PPMd'                    => 'IO::Uncompress::UnPPMd',
                  'IO::Compress::DummyComp::dummycomp'    => 'IO::Uncompress::DummyUncomp::dummyuncomp',
                  'IO::Compress::DummyComp'               => 'IO::Uncompress::DummyUncomp',
              );
@@ -372,6 +390,8 @@
                     'IO::Uncompress::UnLzop::unlzop'          => 'IO::Compress::Lzop',
                     'IO::Uncompress::UnLzp'                   => 'IO::Compress::Lzf',
                     'IO::Uncompress::UnLzf::unlzf'            => 'IO::Compress::Lzf',
+                    'IO::Uncompress::UnPPMd'                  => 'IO::Compress::PPMd',
+                    'IO::Uncompress::UnPPMd::unppmd'          => 'IO::Compress::PPMd',
                     'IO::Uncompress::AnyInflate'              => 'IO::Compress::Gzip',
                     'IO::Uncompress::AnyInflate::anyinflate'  => 'IO::Compress::Gzip',
                     'IO::Uncompress::AnyUncompress'           => 'IO::Compress::Gzip',
diff -urN perl-5.10.0.orig/t/lib/compress/destroy.pl perl-5.10.0/t/lib/compress/destroy.pl
--- perl-5.10.0.orig/t/lib/compress/destroy.pl	2007-12-18 11:47:08.000000000 +0100
+++ perl-5.10.0/t/lib/compress/destroy.pl	2009-12-01 11:18:49.000000000 +0100
@@ -17,7 +17,7 @@
     $extra = 1
         if eval { require Test::NoWarnings ;  import Test::NoWarnings; 1 };
 
-    plan tests => 7 + $extra ;
+    plan tests => 15 + $extra ;
 
     use_ok('IO::File') ;
 }
@@ -73,6 +73,43 @@
 
         ok anyUncompress($name) eq $hello ;
     }
+    
+    {
+        title "Testing DESTROY doesn't clobber \$! etc ";
+
+        my $lex = new LexFile my $name ;
+
+        my $out;
+        my $result;
+        
+        {
+            ok my $z = new $CompressClass($name); 
+            $z->write("abc") ;
+            $! = 22 ;
+
+            cmp_ok $!, '==', 22, '  $! is 22';
+        }
+        
+        cmp_ok $!, '==', 22, "  \$! has not been changed by $CompressClass destructor";
+
+                
+        {
+                my $uncomp;
+                ok my $x = new $UncompressClass($name, -Append => 1)  ;
+                
+                my $len ;
+                1 while ($len = $x->read($result)) > 0 ;
+                
+                $! = 22 ;
+
+                cmp_ok $!, '==', 22, '  $! is 22';
+        }    
+           
+        cmp_ok $!, '==', 22, "  \$! has not been changed by $UncompressClass destructor";
+                
+        is $result, "abc", "  Got uncompressed content ok";
+ 
+    }
 }
 
 1;
diff -urN perl-5.10.0.orig/t/lib/compress/generic.pl perl-5.10.0/t/lib/compress/generic.pl
--- perl-5.10.0.orig/t/lib/compress/generic.pl	2007-12-18 11:47:08.000000000 +0100
+++ perl-5.10.0/t/lib/compress/generic.pl	2009-12-01 11:18:49.000000000 +0100
@@ -47,6 +47,7 @@
     my $Error           = getErrorRef($CompressClass);
     my $UnError         = getErrorRef($UncompressClass);
 
+    if(1)
     {
 
         title "Testing $CompressClass Errors";
@@ -81,7 +82,7 @@
         like $@, mkEvalErr("^${CompressClass}::write: offset outside string");
 
         eval ' $gz->syswrite("abc", 1, -4)' ;
-        like $@, mkEvalErr("^${CompressClass}::write: offset outside string");
+        like $@, mkEvalErr("^${CompressClass}::write: offset outside string"), "write outside string";
     }
 
 
@@ -118,6 +119,7 @@
 
     }
 
+
     {
         title "Testing $CompressClass and $UncompressClass";
 
@@ -161,7 +163,6 @@
 
 
             my $lex = new LexFile my $name ;
-            #my $name = "/tmp/try.lzf";
 
             my $hello = <<EOM ;
 hello world
@@ -322,7 +323,6 @@
 
               ok $x->close, "  close" ;
             }
-            #exit;
 
             is $uncomp, $hello, "  expected output" ;
         }
@@ -419,11 +419,11 @@
               ok ! defined $x->fileno() ;
               1 while $x->read($uncomp) > 0  ;
 
-              ok $x->close ;
+              ok $x->close, "closed" ;
             }
 
-            is $uncomp, $hello ;
-            ok $buffer eq $keep ;
+            is $uncomp, $hello, "got expected uncompressed data" ;
+            ok $buffer eq $keep, "compressed input not changed" ;
         }
 
         if ($CompressClass ne 'RawDeflate')
@@ -434,8 +434,9 @@
             my $buffer = '';
             {
               my $x ;
-              ok $x = new $CompressClass(\$buffer) ;
-              ok $x->close ;
+              $x = new $CompressClass(\$buffer);
+              ok $x, "new $CompressClass" ;
+              ok $x->close, "close ok" ;
           
             }
 
@@ -541,7 +542,6 @@
             read($fh1, $rest, 5000);
             is $x->trailingData() . $rest, $trailer ;
             #print "# [".$x->trailingData() . "][$rest]\n" ;
-            #exit;
 
         }
 
@@ -1416,7 +1416,6 @@
             }
         }
 
-
         {
             title "write tests - invalid data" ;
 

perl-update-IO-Compress-Zlib.patch:
 MANIFEST                                                   |    1 
 ext/IO_Compress_Zlib/Changes                               |   38 +
 ext/IO_Compress_Zlib/Makefile.PL                           |    9 
 ext/IO_Compress_Zlib/README                                |   44 --
 ext/IO_Compress_Zlib/lib/IO/Compress/Adapter/Deflate.pm    |    6 
 ext/IO_Compress_Zlib/lib/IO/Compress/Adapter/Identity.pm   |    4 
 ext/IO_Compress_Zlib/lib/IO/Compress/Deflate.pm            |  143 ------
 ext/IO_Compress_Zlib/lib/IO/Compress/Gzip.pm               |  148 ------
 ext/IO_Compress_Zlib/lib/IO/Compress/Gzip/Constants.pm     |    2 
 ext/IO_Compress_Zlib/lib/IO/Compress/RawDeflate.pm         |  146 ------
 ext/IO_Compress_Zlib/lib/IO/Compress/Zip.pm                |  226 +++-------
 ext/IO_Compress_Zlib/lib/IO/Compress/Zip/Constants.pm      |   18 
 ext/IO_Compress_Zlib/lib/IO/Compress/Zlib/Constants.pm     |    2 
 ext/IO_Compress_Zlib/lib/IO/Compress/Zlib/Extra.pm         |    4 
 ext/IO_Compress_Zlib/lib/IO/Uncompress/Adapter/Identity.pm |    6 
 ext/IO_Compress_Zlib/lib/IO/Uncompress/Adapter/Inflate.pm  |    6 
 ext/IO_Compress_Zlib/lib/IO/Uncompress/AnyInflate.pm       |  143 ------
 ext/IO_Compress_Zlib/lib/IO/Uncompress/Gunzip.pm           |  141 ------
 ext/IO_Compress_Zlib/lib/IO/Uncompress/Inflate.pm          |  131 ------
 ext/IO_Compress_Zlib/lib/IO/Uncompress/RawInflate.pm       |  126 -----
 ext/IO_Compress_Zlib/lib/IO/Uncompress/Unzip.pm            |  204 +++------
 ext/IO_Compress_Zlib/t/006zip.t                            |  276 +++++++++++++
 22 files changed, 614 insertions(+), 1210 deletions(-)

--- NEW FILE perl-update-IO-Compress-Zlib.patch ---
IO-Compress-Zlib-2.015
(omitting changes to private/MakeUtil.pm)
(omitting changes to perl-5.10.0/t/lib/compress; these are in
IO-Compress-Base 2.015 update)

diff -urN perl-5.10.0.orig/MANIFEST perl-5.10.0/MANIFEST
--- perl-5.10.0.orig/MANIFEST	2009-12-01 11:02:59.000000000 +0100
+++ perl-5.10.0/MANIFEST	2009-12-01 12:10:21.000000000 +0100
@@ -736,6 +736,7 @@
 ext/IO_Compress_Zlib/t/002any-zip.t	IO::Compress::Zlib
 ext/IO_Compress_Zlib/t/004gziphdr.t	IO::Compress::Zlib
 ext/IO_Compress_Zlib/t/005defhdr.t	IO::Compress::Zlib
+ext/IO_Compress_Zlib/t/006zip.t	IO::Compress::Zlib
 ext/IO_Compress_Zlib/t/010examples.t	IO::Compress::Zlib
 ext/IO_Compress_Zlib/t/020isize.t	IO::Compress::Zlib
 ext/IO_Compress_Zlib/t/050interop-gzip.t	IO::Compress::Zlib
diff -urN perl-5.10.0.orig/ext/IO_Compress_Zlib/Changes perl-5.10.0/ext/IO_Compress_Zlib/Changes
--- perl-5.10.0.orig/ext/IO_Compress_Zlib/Changes	2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/IO_Compress_Zlib/Changes	2009-12-01 12:05:25.000000000 +0100
@@ -1,6 +1,44 @@
 CHANGES
 -------
 
+  2.015 3 September 2008
+
+      * Makefile.PL
+        Backout changes made in 2.014
+
+  2.014 2 September 2008
+
+      * Makefile.PL
+        Updated to check for indirect dependencies.
+
+  2.012 15 July 2008
+
+      * No Changes
+
+  2.011 17 May 2008
+
+      * IO::Uncompress::Unzip 
+        - Print an error message if the zip file contains a
+          member compressed with bzip2 and IO::Uncompress::Bunzip2 is 
+          not available.
+        - Could not cope with mixed compression zip files. For example a
+          zip file that contains both STORED and DEFLATED content.
+          [RT #35573]
+
+  2.010 5 May 2008
+
+      * Fixed problem that meant Perl 5.10 could not upgrade this module.
+        [RT #35343]
+
+  2.009 20 April 2008
+
+      * IO::Compress::Zip 
+
+        - Added exUnix2 option to allow storing of UID & GID.
+        - When running on a Unix derivative the ExtAttr option now defaults
+          to the equivalent of 0666. For all other systems the default
+          remains 0.
+
   2.008 2 November 2007
 
       * Minor documentation changes in README
diff -urN perl-5.10.0.orig/ext/IO_Compress_Zlib/Makefile.PL perl-5.10.0/ext/IO_Compress_Zlib/Makefile.PL
--- perl-5.10.0.orig/ext/IO_Compress_Zlib/Makefile.PL	2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/IO_Compress_Zlib/Makefile.PL	2009-12-01 12:05:35.000000000 +0100
@@ -3,7 +3,7 @@
 use strict ;
 require 5.004 ;
 
-$::VERSION = '2.008' ;
+$::VERSION = '2.015' ;
 
 use private::MakeUtil;
 use ExtUtils::MakeMaker 5.16 ;
@@ -51,6 +51,13 @@
 
     INSTALLDIRS => ($] >= 5.009 ? 'perl' : 'site'),
 
+    (
+    $] >= 5.009 && ! $ENV{PERL_CORE}
+        ? (INST_LIB    => 'blib/arch')
+        : ()
+    ),
+
+
     ((ExtUtils::MakeMaker->VERSION() gt '6.30') ?
         ('LICENSE'  => 'perl')         : ()),    
 
diff -urN perl-5.10.0.orig/ext/IO_Compress_Zlib/README perl-5.10.0/ext/IO_Compress_Zlib/README
--- perl-5.10.0.orig/ext/IO_Compress_Zlib/README	2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/IO_Compress_Zlib/README	2009-12-01 12:05:41.000000000 +0100
@@ -1,44 +1,30 @@
 
                              IO-Compress-Zlib
 
-                             Version 2.008
+                             Version 2.015
 
-                             2nd November 2007
+                            2nd September 2008
 
-
-       Copyright (c) 2005-2007 Paul Marquess. All rights reserved.
+       Copyright (c) 2005-2008 Paul Marquess. All rights reserved.
           This program is free software; you can redistribute it
            and/or modify it under the same terms as Perl itself.
 
-
-
-
 DESCRIPTION
 -----------
 
-
 This module provides a Perl interface to allow reading and writing of RFC
 1950, 1951, 1952 (i.e. gzip) and zip files/buffers.
 
-
-
-
-
 PREREQUISITES
 -------------
 
 Before you can build IO-Compress-Zlib you need to have the following
 installed on your system:
 
-
     * Perl 5.004 or better. 
     * Compress::Raw::Zlib
     * IO::Compress::Base
 
-
-
-
-
 BUILDING THE MODULE
 -------------------
 
@@ -49,8 +35,6 @@
     make
     make test
 
-
-
 INSTALLATION
 ------------
 
@@ -58,28 +42,16 @@
 
     make install
 
-
-
-
-
 TROUBLESHOOTING
 ---------------
 
-
-
-
-
-
-
-
-
 The t/020isize Test Suite
 ------------------------
 
 This test suite checks that IO-Compress-Zlib can cope with gzip files
 that are larger than 2^32 bytes.
 
-By default these test are NOT run when you do a "make test". If you
+By default these tests are NOT run when you do a "make test". If you
 really want to run them, you need to execute "make longtest".
 
 Be warned though -- this test suite can take hours to run on a slow box.
@@ -88,9 +60,6 @@
 run out of memory during this test. This should not be considered a bug
 in the IO-Compress-Zlib module.
 
-
-
-
 FEEDBACK
 --------
 
@@ -124,9 +93,7 @@
         If you haven't installed IO-Compress-Zlib then search IO::Compress::Gzip.pm
         for a line like this:
 
-          $VERSION = "2.008" ;
-
-
+          $VERSION = "2.015" ;
 
[...4833 lines suppressed...]
+                   'goodbye ',
+                   );
+
+    my $zip = new IO::Compress::Zip $file1,
+                    Name => "one", Method => ZIP_CM_DEFLATE, Stream => 0;
+    isa_ok $zip, "IO::Compress::Zip";
+
+    is $zip->write($content[0]), length($content[0]), "write"; 
+    $zip->newStream(Name=> "two", Method => ZIP_CM_DEFLATE);
+    is $zip->write($content[1]), length($content[1]), "write"; 
+    $zip->newStream(Name=> "three", Method => ZIP_CM_DEFLATE);
+    is $zip->write($content[2]), length($content[2]), "write"; 
+    ok $zip->close(), "closed";                    
+
+    my @got = getContent($file1);
+
+    is $got[0], $content[0], "Got 1st entry";
+    is $got[1], $content[1], "Got 2nd entry";
+    is $got[2], $content[2], "Got 3nd entry";
+}
+
+SKIP:
+{
+    title "Create a simple zip - All Bzip2";
+
+    skip "IO::Compress::Bzip2 not available", 9
+        unless defined $IO::Compress::Bzip2::VERSION;
+
+    my $lex = new LexFile my $file1;
+
+    my @content = (
+                   'hello',
+                   '',
+                   'goodbye ',
+                   );
+
+    my $zip = new IO::Compress::Zip $file1,
+                    Name => "one", Method => ZIP_CM_BZIP2, Stream => 0;
+    isa_ok $zip, "IO::Compress::Zip";
+
+    is $zip->write($content[0]), length($content[0]), "write"; 
+    $zip->newStream(Name=> "two", Method => ZIP_CM_BZIP2);
+    is $zip->write($content[1]), length($content[1]), "write"; 
+    $zip->newStream(Name=> "three", Method => ZIP_CM_BZIP2);
+    is $zip->write($content[2]), length($content[2]), "write"; 
+    ok $zip->close(), "closed";                    
+
+    my @got = getContent($file1);
+
+    is $got[0], $content[0], "Got 1st entry";
+    is $got[1], $content[1], "Got 2nd entry";
+    is $got[2], $content[2], "Got 3nd entry";
+}
+
+SKIP:
+{
+    title "Create a simple zip - Deflate + Bzip2";
+
+    skip "IO::Compress::Bzip2 not available", 9
+        unless $IO::Compress::Bzip2::VERSION;
+
+    my $lex = new LexFile my $file1;
+
+    my @content = (
+                   'hello',
+                   'and',
+                   'goodbye ',
+                   );
+
+    my $zip = new IO::Compress::Zip $file1,
+                    Name => "one", Method => ZIP_CM_DEFLATE, Stream => 0;
+    isa_ok $zip, "IO::Compress::Zip";
+
+    is $zip->write($content[0]), length($content[0]), "write"; 
+    $zip->newStream(Name=> "two", Method => ZIP_CM_BZIP2);
+    is $zip->write($content[1]), length($content[1]), "write"; 
+    $zip->newStream(Name=> "three", Method => ZIP_CM_DEFLATE);
+    is $zip->write($content[2]), length($content[2]), "write"; 
+    ok $zip->close(), "closed";                    
+
+    my @got = getContent($file1);
+
+    is $got[0], $content[0], "Got 1st entry";
+    is $got[1], $content[1], "Got 2nd entry";
+    is $got[2], $content[2], "Got 3nd entry";
+}
+
+{
+    title "Create a simple zip - All STORE";
+
+    my $lex = new LexFile my $file1;
+
+    my @content = (
+                   'hello',
+                   '',
+                   'goodbye ',
+                   );
+
+    my $zip = new IO::Compress::Zip $file1,
+                    Name => "one", Method => ZIP_CM_STORE, Stream => 0;
+    isa_ok $zip, "IO::Compress::Zip";
+
+    is $zip->write($content[0]), length($content[0]), "write"; 
+    $zip->newStream(Name=> "two", Method => ZIP_CM_STORE);
+    is $zip->write($content[1]), length($content[1]), "write"; 
+    $zip->newStream(Name=> "three", Method => ZIP_CM_STORE);
+    is $zip->write($content[2]), length($content[2]), "write"; 
+    ok $zip->close(), "closed";                    
+
+    my @got = getContent($file1);
+
+    is $got[0], $content[0], "Got 1st entry";
+    is $got[1], $content[1], "Got 2nd entry";
+    is $got[2], $content[2], "Got 3nd entry";
+}
+
+{
+    title "Create a simple zip - Deflate + STORE";
+
+    my $lex = new LexFile my $file1;
+
+    my @content = qw(
+                   hello 
+                       and
+                   goodbye 
+                   );
+
+    my $zip = new IO::Compress::Zip $file1,
+                    Name => "one", Method => ZIP_CM_DEFLATE, Stream => 0;
+    isa_ok $zip, "IO::Compress::Zip";
+
+    is $zip->write($content[0]), length($content[0]), "write"; 
+    $zip->newStream(Name=> "two", Method => ZIP_CM_STORE);
+    is $zip->write($content[1]), length($content[1]), "write"; 
+    $zip->newStream(Name=> "three", Method => ZIP_CM_DEFLATE);
+    is $zip->write($content[2]), length($content[2]), "write"; 
+    ok $zip->close(), "closed";                    
+
+    my @got = getContent($file1);
+
+    is $got[0], $content[0], "Got 1st entry";
+    is $got[1], $content[1], "Got 2nd entry";
+    is $got[2], $content[2], "Got 3nd entry";
+}
+
+{
+    title "Create a simple zip - Deflate + zero length STORE";
+
+    my $lex = new LexFile my $file1;
+
+    my @content = (
+                   'hello ',
+                   '',
+                   'goodbye ',
+                   );
+
+    my $zip = new IO::Compress::Zip $file1,
+                    Name => "one", Method => ZIP_CM_DEFLATE, Stream => 0;
+    isa_ok $zip, "IO::Compress::Zip";
+
+    is $zip->write($content[0]), length($content[0]), "write"; 
+    $zip->newStream(Name=> "two", Method => ZIP_CM_STORE);
+    is $zip->write($content[1]), length($content[1]), "write"; 
+    $zip->newStream(Name=> "three", Method => ZIP_CM_DEFLATE);
+    is $zip->write($content[2]), length($content[2]), "write"; 
+    ok $zip->close(), "closed";                    
+
+    my @got = getContent($file1);
+
+    is $got[0], $content[0], "Got 1st entry";
+    ok $got[1] eq $content[1], "Got 2nd entry";
+    is $got[2], $content[2], "Got 3nd entry";
+}
+
+
+SKIP:
+for my $method (ZIP_CM_DEFLATE, ZIP_CM_STORE, ZIP_CM_BZIP2)
+{
+    title "Read a line from zip, Method $method";
+
+    skip "IO::Compress::Bzip2 not available", 14
+        unless defined $IO::Compress::Bzip2::VERSION;
+
+    my $content = "a single line\n";
+    my $zip ;
+
+    my $status = zip \$content => \$zip, 
+                    Method => $method, 
+                    Stream => 0, 
+                    Name => "123";
+    is $status, 1, "  Created a zip file";
+
+    my $u = new IO::Uncompress::Unzip \$zip;
+    isa_ok $u, "IO::Uncompress::Unzip";
+
+    is $u->getline, $content, "  Read first line ok";
+    ok ! $u->getline, "  Second line doesn't exist";
+
+
+}


Index: perl.spec
===================================================================
RCS file: /cvs/extras/rpms/perl/devel/perl.spec,v
retrieving revision 1.236
retrieving revision 1.237
diff -u -p -r1.236 -r1.237
--- perl.spec	24 Nov 2009 13:12:49 -0000	1.236
+++ perl.spec	1 Dec 2009 15:14:56 -0000	1.237
@@ -7,7 +7,7 @@
 
 Name:           perl
 Version:        %{perl_version}
-Release:        85%{?dist}
+Release:        87%{?dist}
 Epoch:          %{perl_epoch}
 Summary:        Practical Extraction and Report Language
 Group:          Development/Languages
@@ -239,15 +239,19 @@ Patch118:	perl-update-autodie.patch
 # cpan has it under PathTools-3.30
 Patch119:	perl-update-FileSpec.patch
 %define			    File_Spec_version 3.30
-Patch120:	perl-update-Compress_Raw_Zlib.patch
-%define			    Compress_Raw_Zlib 2.020
+Patch120:	perl-update-Compress-Raw-Zlib.patch
+%define			    Compress_Raw_Zlib_version 2.023
 Patch121:	perl-update-Scalar-List-Utils.patch
 %define			    Scalar_List_Utils 1.21
 Patch122:	perl-update-Module-Pluggable.patch
-%define             Module_Pluggable_version 3.90
+%define			    Module_Pluggable_version 3.90
 # Also fixes segfault when objects are reblessed (rt#33242, rhbz#459918)
 Patch123:	perl-update-Storable.patch
-%define             Storable_version 2.21
+%define			    Storable_version 2.21
+Patch124:	perl-update-IO-Compress-Base.patch
+%define			    IO_Compress_Base_version 2.015
+Patch125:	perl-update-IO-Compress-Zlib.patch
+%define			    IO_Compress_Zlib_version 2.015
 
 # Fedora uses links instead of lynx
 # patches File-Fetch and CPAN
@@ -423,7 +427,7 @@ Summary:        Low-Level Interface to t
 Group:          Development/Libraries
 License:        GPL+ or Artistic
 Epoch:          0
-Version:        2.008
+Version:        %{Compress_Raw_Zlib_version}
 Requires:       perl = %{perl_epoch}:%{perl_version}-%{release}
 
 %description Compress-Raw-Zlib
@@ -577,7 +581,7 @@ Summary:        Base Class for IO::Compr
 Group:          Development/Libraries
 License:        GPL+ or Artistic
 Epoch:          0
-Version:        2.008
+Version:        %{IO_Compress_Base_version}
 Requires:       perl = %{perl_epoch}:%{perl_version}-%{release}
 
 %description IO-Compress-Base
@@ -592,8 +596,7 @@ Summary:        Perl interface to allow 
 Group:          Development/Libraries
 License:        GPL+ or Artistic
 Epoch:          0
-# Really 1.23_01, but we drop the _01.
-Version:        2.008
+Version:        %{IO_Compress_Zlib_version}
 Requires:       perl = %{perl_epoch}:%{perl_version}-%{release}
 
 %description IO-Compress-Zlib
@@ -1029,10 +1032,12 @@ upstream tarball from perl.org.
 %patch120 -p1
 %patch121 -p1
 %patch122 -p1
-%patch123 -p1
 # 0-byte files and patch don't seem to agree
 mkdir t/Module_Pluggable/lib/Zot/
 touch t/Module_Pluggable/lib/Zot/.Zork.pm
+%patch123 -p1
+%patch124 -p1
+%patch125 -p1
 
 
 %patch201 -p1
@@ -1312,10 +1317,12 @@ perl -x patchlevel.h \
 	'Fedora Patch117: Update Digest::SHA to %{Digest_SHA_version}' \
 	'Fedora Patch117: Update module autodie to %{autodie_version}' \
 	'Fedora Patch119: Update File::Spec to %{File_Spec_version}' \
-	'Fedora Patch120: Update Compress::Raw::Zlib to %{Compress_Raw_Zlib}' \
+	'Fedora Patch120: Update Compress::Raw::Zlib to %{Compress_Raw_Zlib_version}' \
 	'Fedora Patch121: Update Scalar-List-Utils to %{Scalar_List_Utils}' \
 	'Fedora Patch122: Update Module-Pluggable to %{Module_Pluggable_version}' \
 	'Fedora Patch123: Update Storable to %{Storable_version}' \
+	'Fedora Patch124: Update IO::Compress::Base to %{IO_Compress_Base_version}' \
+	'Fedora Patch125: Update IO::Compress::Zlib to %{IO_Compress_Zlib_version}' \
 	'Fedora Patch201: Fedora uses links instead of lynx' \
 	%{nil}
 
@@ -1942,6 +1949,14 @@ TMPDIR="$PWD/tmp" make test
 
 # Old changelog entries are preserved in CVS.
 %changelog
+* Tue Dec  1 2009 Stepan Kasal <skasal at redhat.com> - 4:5.10.0-87
+- fix patch-update-Compress-Raw-Zlib.patch (did not patch Zlib.pm)
+- update Compress::Raw::Zlib to 2.023
+- update IO::Compress::Base, and IO::Compress::Zlib to 2.015 (#542645)
+
+* Mon Nov 30 2009 Marcela Mašláňová <mmaslano at redhat.com> - 4:5.10.0-86
+- 542645 update IO-Compress-Base
+
 * Tue Nov 24 2009 Stepan Kasal <skasal at redhat.com> - 4:5.10.0-85
 - back out perl-5.10.0-spamassassin.patch (#528572)
 


--- perl-update-Compress_Raw_Zlib.patch DELETED ---




More information about the fedora-extras-commits mailing list