From: Steve Hay Date: Fri, 26 Sep 2008 16:43:21 +0000 (+0000) Subject: Upgrade Compression modules to 2.015 X-Git-Tag: accepted/trunk/20130322.191538~12751 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9253672d50e6fbfe60cc73666d91a174b588b7e4;p=platform%2Fupstream%2Fperl.git Upgrade Compression modules to 2.015 p4raw-id: //depot/perl@34425 --- diff --git a/ext/Compress/Raw/Zlib/Changes b/ext/Compress/Raw/Zlib/Changes index b7cc19d..e818e4f 100644 --- a/ext/Compress/Raw/Zlib/Changes +++ b/ext/Compress/Raw/Zlib/Changes @@ -1,6 +1,16 @@ 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 * Document the gzip flags that WindowBits can take. diff --git a/ext/Compress/Raw/Zlib/README b/ext/Compress/Raw/Zlib/README index 42d2d6b..0a5f518 100644 --- a/ext/Compress/Raw/Zlib/README +++ b/ext/Compress/Raw/Zlib/README @@ -1,9 +1,9 @@ Compress-Raw-Zlib - Version 2.012 + Version 2.015 - 15th July 2008 + 2nd September 2008 Copyright (c) 2005-2008 Paul Marquess. All rights reserved. This program is free software; you can redistribute it @@ -326,7 +326,7 @@ To help me help you, I need all of the following information: If you haven't installed Compress-Raw-Zlib then search Compress::Raw::Zlib.pm for a line like this: - $VERSION = "2.012" ; + $VERSION = "2.015" ; c. The version of zlib you have used. If you have successfully installed Compress-Raw-Zlib, this one-liner diff --git a/ext/Compress/Raw/Zlib/Zlib.xs b/ext/Compress/Raw/Zlib/Zlib.xs index cd366f1..821e1d1 100644 --- a/ext/Compress/Raw/Zlib/Zlib.xs +++ b/ext/Compress/Raw/Zlib/Zlib.xs @@ -112,6 +112,7 @@ typedef struct di_stream { #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; @@ -470,6 +471,8 @@ DispStream(s, message) 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); @@ -1329,7 +1332,16 @@ inflate (s, buf, output, eof=FALSE) RETVAL = inflate(&(s->stream), Z_SYNC_FLUSH); - if (RETVAL == Z_STREAM_ERROR || RETVAL == Z_MEM_ERROR || + + 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 (s->flags & FLAG_LIMIT_OUTPUT || + RETVAL == Z_STREAM_ERROR || RETVAL == Z_MEM_ERROR || RETVAL == Z_DATA_ERROR || RETVAL == Z_STREAM_END ) break ; @@ -1341,17 +1353,9 @@ inflate (s, buf, output, eof=FALSE) 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)); - } - } #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*) " "; @@ -1399,7 +1403,7 @@ inflate (s, buf, output, eof=FALSE) 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) diff --git a/ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm b/ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm index 5f15031..6d096e0 100644 --- a/ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm +++ b/ext/Compress/Raw/Zlib/lib/Compress/Raw/Zlib.pm @@ -13,7 +13,7 @@ use warnings ; use bytes ; our ($VERSION, $XS_VERSION, @ISA, @EXPORT, $AUTOLOAD); -$VERSION = '2.012'; +$VERSION = '2.015'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -84,6 +84,7 @@ use constant FLAG_APPEND => 1 ; 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; @@ -387,6 +388,7 @@ sub Compress::Raw::Zlib::Inflate::new 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], @@ -406,6 +408,8 @@ sub Compress::Raw::Zlib::Inflate::new $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() diff --git a/ext/Compress/Raw/Zlib/private/MakeUtil.pm b/ext/Compress/Raw/Zlib/private/MakeUtil.pm index 4c706e0..e595910 100644 --- a/ext/Compress/Raw/Zlib/private/MakeUtil.pm +++ b/ext/Compress/Raw/Zlib/private/MakeUtil.pm @@ -297,6 +297,83 @@ sub doUpDownViaCopy } } + +sub FindBrokenDependencies +{ + my $version = shift ; + my %thisModule = map { $_ => 1} @_; + + my @modules = qw( + IO::Compress::Base + IO::Compress::Base::Common + IO::Uncompress::Base + + Compress::Raw::Zlib + Compress::Raw::Bzip2 + + IO::Compress::RawDeflate + IO::Uncompress::RawInflate + IO::Compress::Deflate + IO::Uncompress::Inflate + IO::Compress::Gzip + IO::Compress::Gzip::Constants + IO::Uncompress::Gunzip + IO::Compress::Zip + IO::Uncompress::Unzip + + IO::Compress::Bzip2 + IO::Uncompress::Bunzip2 + + IO::Compress::Lzf + IO::Uncompress::UnLzf + + IO::Compress::Lzop + IO::Uncompress::UnLzop + + Compress::Zlib + ); + + my @broken = (); + + foreach my $module ( grep { ! $thisModule{$_} } @modules) + { + my $hasVersion = getInstalledVersion($module); + + # No need to upgrade if the module isn't installed at all + next + if ! defined $hasVersion; + + # If already have C::Z version 1, then an upgrade to any of the + # IO::Compress modules will not break it. + next + if $module eq 'Compress::Zlib' && $hasVersion < 2; + + if ($hasVersion < $version) + { + push @broken, $module + } + } + + return @broken; +} + +sub getInstalledVersion +{ + my $module = shift; + my $version; + + eval " require $module; "; + + if ($@ eq '') + { + no strict 'refs'; + $version = ${ $module . "::VERSION" }; + $version = 0 + } + + return $version; +} + package MakeUtil ; 1; diff --git a/ext/Compress/Zlib/Changes b/ext/Compress/Zlib/Changes index 74874e7..931eea6 100644 --- a/ext/Compress/Zlib/Changes +++ b/ext/Compress/Zlib/Changes @@ -1,6 +1,16 @@ 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 diff --git a/ext/Compress/Zlib/Makefile.PL b/ext/Compress/Zlib/Makefile.PL index 6f4a8bb..1f6ba80 100755 --- a/ext/Compress/Zlib/Makefile.PL +++ b/ext/Compress/Zlib/Makefile.PL @@ -3,7 +3,7 @@ use strict ; require 5.004 ; -$::VERSION = '2.012' ; +$::VERSION = '2.015' ; use private::MakeUtil; use ExtUtils::MakeMaker 5.16 ; diff --git a/ext/Compress/Zlib/README b/ext/Compress/Zlib/README index 77264db..89d1f07 100644 --- a/ext/Compress/Zlib/README +++ b/ext/Compress/Zlib/README @@ -1,9 +1,9 @@ Compress-Zlib - Version 2.012 + Version 2.015 - 15th July 2008 + 2nd September 2008 Copyright (c) 1995-2008 Paul Marquess. All rights reserved. This program is free software; you can redistribute it @@ -106,7 +106,7 @@ To help me help you, I need all of the following information: If you haven't installed Compress-Zlib then search Compress::Zlib.pm for a line like this: - $VERSION = "2.012" ; + $VERSION = "2.015" ; 2. If you are having problems building Compress-Zlib, send me a complete log of what happened. Start by unpacking the Compress-Zlib diff --git a/ext/Compress/Zlib/lib/Compress/Zlib.pm b/ext/Compress/Zlib/lib/Compress/Zlib.pm index 47b2557..7c712f6 100644 --- a/ext/Compress/Zlib/lib/Compress/Zlib.pm +++ b/ext/Compress/Zlib/lib/Compress/Zlib.pm @@ -8,17 +8,17 @@ use Carp ; use IO::Handle ; use Scalar::Util qw(dualvar); -use IO::Compress::Base::Common 2.012 ; -use Compress::Raw::Zlib 2.012 ; -use IO::Compress::Gzip 2.012 ; -use IO::Uncompress::Gunzip 2.012 ; +use IO::Compress::Base::Common 2.015 ; +use Compress::Raw::Zlib 2.015 ; +use IO::Compress::Gzip 2.015 ; +use IO::Uncompress::Gunzip 2.015 ; use strict ; use warnings ; use bytes ; our ($VERSION, $XS_VERSION, @ISA, @EXPORT, $AUTOLOAD); -$VERSION = '2.012'; +$VERSION = '2.015'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -452,7 +452,7 @@ sub inflate package Compress::Zlib ; -use IO::Compress::Gzip::Constants 2.012 ; +use IO::Compress::Gzip::Constants 2.015 ; sub memGzip($) { diff --git a/ext/Compress/Zlib/private/MakeUtil.pm b/ext/Compress/Zlib/private/MakeUtil.pm index 4c706e0..e595910 100644 --- a/ext/Compress/Zlib/private/MakeUtil.pm +++ b/ext/Compress/Zlib/private/MakeUtil.pm @@ -297,6 +297,83 @@ sub doUpDownViaCopy } } + +sub FindBrokenDependencies +{ + my $version = shift ; + my %thisModule = map { $_ => 1} @_; + + my @modules = qw( + IO::Compress::Base + IO::Compress::Base::Common + IO::Uncompress::Base + + Compress::Raw::Zlib + Compress::Raw::Bzip2 + + IO::Compress::RawDeflate + IO::Uncompress::RawInflate + IO::Compress::Deflate + IO::Uncompress::Inflate + IO::Compress::Gzip + IO::Compress::Gzip::Constants + IO::Uncompress::Gunzip + IO::Compress::Zip + IO::Uncompress::Unzip + + IO::Compress::Bzip2 + IO::Uncompress::Bunzip2 + + IO::Compress::Lzf + IO::Uncompress::UnLzf + + IO::Compress::Lzop + IO::Uncompress::UnLzop + + Compress::Zlib + ); + + my @broken = (); + + foreach my $module ( grep { ! $thisModule{$_} } @modules) + { + my $hasVersion = getInstalledVersion($module); + + # No need to upgrade if the module isn't installed at all + next + if ! defined $hasVersion; + + # If already have C::Z version 1, then an upgrade to any of the + # IO::Compress modules will not break it. + next + if $module eq 'Compress::Zlib' && $hasVersion < 2; + + if ($hasVersion < $version) + { + push @broken, $module + } + } + + return @broken; +} + +sub getInstalledVersion +{ + my $module = shift; + my $version; + + eval " require $module; "; + + if ($@ eq '') + { + no strict 'refs'; + $version = ${ $module . "::VERSION" }; + $version = 0 + } + + return $version; +} + package MakeUtil ; 1; diff --git a/ext/IO_Compress_Base/Changes b/ext/IO_Compress_Base/Changes index 3330827..92142be 100644 --- a/ext/IO_Compress_Base/Changes +++ b/ext/IO_Compress_Base/Changes @@ -1,6 +1,20 @@ 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 diff --git a/ext/IO_Compress_Base/README b/ext/IO_Compress_Base/README index 823165c..0cfa873 100644 --- a/ext/IO_Compress_Base/README +++ b/ext/IO_Compress_Base/README @@ -1,9 +1,9 @@ IO-Compress-Base - Version 2.012 + Version 2.015 - 15th July 2008 + 2nd September 2008 Copyright (c) 2005-2008 Paul Marquess. All rights reserved. This program is free software; you can redistribute it @@ -76,7 +76,7 @@ To help me help you, I need all of the following information: If you haven't installed IO-Compress-Base then search IO::Compress::Base.pm for a line like this: - $VERSION = "2.012" ; + $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 diff --git a/ext/IO_Compress_Base/lib/IO/Compress/Base.pm b/ext/IO_Compress_Base/lib/IO/Compress/Base.pm index 384ca05..484c0cf 100644 --- a/ext/IO_Compress_Base/lib/IO/Compress/Base.pm +++ b/ext/IO_Compress_Base/lib/IO/Compress/Base.pm @@ -6,7 +6,7 @@ require 5.004 ; use strict ; use warnings; -use IO::Compress::Base::Common 2.012 ; +use IO::Compress::Base::Common 2.015 ; use IO::File ; use Scalar::Util qw(blessed readonly); @@ -20,7 +20,7 @@ use bytes; our (@ISA, $VERSION); @ISA = qw(Exporter IO::File); -$VERSION = '2.012'; +$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. diff --git a/ext/IO_Compress_Base/lib/IO/Compress/Base/Common.pm b/ext/IO_Compress_Base/lib/IO/Compress/Base/Common.pm index 26750f7..d35a4df 100644 --- a/ext/IO_Compress_Base/lib/IO/Compress/Base/Common.pm +++ b/ext/IO_Compress_Base/lib/IO/Compress/Base/Common.pm @@ -11,7 +11,7 @@ use File::GlobMapper; require Exporter; our ($VERSION, @ISA, @EXPORT, %EXPORT_TAGS, $HAS_ENCODE); @ISA = qw(Exporter); -$VERSION = '2.012'; +$VERSION = '2.015'; @EXPORT = qw( isaFilehandle isaFilename whatIsInput whatIsOutput isaFileGlobString cleanFileGlobString oneTarget @@ -485,7 +485,11 @@ sub ParseParameters 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 @@ sub IO::Compress::Base::Parameters::parse my $got = $self->{Got} ; my $firstTime = keys %{ $got } == 0 ; + my $other; my (@Bad) ; my @entered = () ; @@ -544,9 +549,7 @@ sub IO::Compress::Base::Parameters::parse @entered = () ; } elsif (@_ == 1) { - my $href = $_[0] ; - return $_[0] - if UNIVERSAL::isa($_[0], "IO::Compress::Base::Parameters"); + my $href = $_[0] ; return $self->setError("Expected even number of parameters, got 1") if ! defined $href or ! ref $href or ref $href ne "HASH" ; @@ -562,8 +565,13 @@ sub IO::Compress::Base::Parameters::parse 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] ; + } } } @@ -591,6 +599,24 @@ sub IO::Compress::Base::Parameters::parse } 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 --git a/ext/IO_Compress_Base/lib/IO/Uncompress/AnyUncompress.pm b/ext/IO_Compress_Base/lib/IO/Uncompress/AnyUncompress.pm index e61acc6..bdd2822 100644 --- a/ext/IO_Compress_Base/lib/IO/Uncompress/AnyUncompress.pm +++ b/ext/IO_Compress_Base/lib/IO/Uncompress/AnyUncompress.pm @@ -4,16 +4,16 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.012 qw(createSelfTiedObject); +use IO::Compress::Base::Common 2.015 qw(createSelfTiedObject); -use IO::Uncompress::Base 2.012 ; +use IO::Uncompress::Base 2.015 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyUncompressError); -$VERSION = '2.012'; +$VERSION = '2.015'; $AnyUncompressError = ''; @ISA = qw( Exporter IO::Uncompress::Base ); @@ -27,18 +27,18 @@ Exporter::export_ok_tags('all'); BEGIN { - eval ' use IO::Uncompress::Adapter::Inflate 2.012 ;'; - eval ' use IO::Uncompress::Adapter::Bunzip2 2.012 ;'; - eval ' use IO::Uncompress::Adapter::LZO 2.012 ;'; - eval ' use IO::Uncompress::Adapter::Lzf 2.012 ;'; - - eval ' use IO::Uncompress::Bunzip2 2.012 ;'; - eval ' use IO::Uncompress::UnLzop 2.012 ;'; - eval ' use IO::Uncompress::Gunzip 2.012 ;'; - eval ' use IO::Uncompress::Inflate 2.012 ;'; - eval ' use IO::Uncompress::RawInflate 2.012 ;'; - eval ' use IO::Uncompress::Unzip 2.012 ;'; - eval ' use IO::Uncompress::UnLzf 2.012 ;'; + 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 anyuncompress sub getExtraParams { - use IO::Compress::Base::Common 2.012 qw(:Parse); + use IO::Compress::Base::Common 2.015 qw(:Parse); return ( 'RawInflate' => [1, 1, Parse_boolean, 0] ) ; } diff --git a/ext/IO_Compress_Base/lib/IO/Uncompress/Base.pm b/ext/IO_Compress_Base/lib/IO/Uncompress/Base.pm index bee5698..faeb823 100644 --- a/ext/IO_Compress_Base/lib/IO/Uncompress/Base.pm +++ b/ext/IO_Compress_Base/lib/IO/Uncompress/Base.pm @@ -9,12 +9,12 @@ our (@ISA, $VERSION, @EXPORT_OK, %EXPORT_TAGS); @ISA = qw(Exporter IO::File); -$VERSION = '2.012'; +$VERSION = '2.015'; use constant G_EOF => 0 ; use constant G_ERR => -1 ; -use IO::Compress::Base::Common 2.012 ; +use IO::Compress::Base::Common 2.015 ; #use Parse::Parameters ; use IO::File ; @@ -1453,3 +1453,4 @@ 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 --git a/ext/IO_Compress_Base/private/MakeUtil.pm b/ext/IO_Compress_Base/private/MakeUtil.pm index 4c706e0..e595910 100644 --- a/ext/IO_Compress_Base/private/MakeUtil.pm +++ b/ext/IO_Compress_Base/private/MakeUtil.pm @@ -297,6 +297,83 @@ sub doUpDownViaCopy } } + +sub FindBrokenDependencies +{ + my $version = shift ; + my %thisModule = map { $_ => 1} @_; + + my @modules = qw( + IO::Compress::Base + IO::Compress::Base::Common + IO::Uncompress::Base + + Compress::Raw::Zlib + Compress::Raw::Bzip2 + + IO::Compress::RawDeflate + IO::Uncompress::RawInflate + IO::Compress::Deflate + IO::Uncompress::Inflate + IO::Compress::Gzip + IO::Compress::Gzip::Constants + IO::Uncompress::Gunzip + IO::Compress::Zip + IO::Uncompress::Unzip + + IO::Compress::Bzip2 + IO::Uncompress::Bunzip2 + + IO::Compress::Lzf + IO::Uncompress::UnLzf + + IO::Compress::Lzop + IO::Uncompress::UnLzop + + Compress::Zlib + ); + + my @broken = (); + + foreach my $module ( grep { ! $thisModule{$_} } @modules) + { + my $hasVersion = getInstalledVersion($module); + + # No need to upgrade if the module isn't installed at all + next + if ! defined $hasVersion; + + # If already have C::Z version 1, then an upgrade to any of the + # IO::Compress modules will not break it. + next + if $module eq 'Compress::Zlib' && $hasVersion < 2; + + if ($hasVersion < $version) + { + push @broken, $module + } + } + + return @broken; +} + +sub getInstalledVersion +{ + my $module = shift; + my $version; + + eval " require $module; "; + + if ($@ eq '') + { + no strict 'refs'; + $version = ${ $module . "::VERSION" }; + $version = 0 + } + + return $version; +} + package MakeUtil ; 1; diff --git a/ext/IO_Compress_Base/t/01misc.t b/ext/IO_Compress_Base/t/01misc.t index 3dda40a..27706f6 100644 --- a/ext/IO_Compress_Base/t/01misc.t +++ b/ext/IO_Compress_Base/t/01misc.t @@ -19,7 +19,7 @@ BEGIN { $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 @@ sub My::testParseParameters() 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,16 +115,41 @@ undef) ; 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) ; -# 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 --git a/ext/IO_Compress_Zlib/Changes b/ext/IO_Compress_Zlib/Changes index 0e6ff5c..dfcb378 100644 --- a/ext/IO_Compress_Zlib/Changes +++ b/ext/IO_Compress_Zlib/Changes @@ -1,6 +1,16 @@ 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 diff --git a/ext/IO_Compress_Zlib/Makefile.PL b/ext/IO_Compress_Zlib/Makefile.PL index 026c7b8..854b1d9 100644 --- a/ext/IO_Compress_Zlib/Makefile.PL +++ b/ext/IO_Compress_Zlib/Makefile.PL @@ -3,7 +3,7 @@ use strict ; require 5.004 ; -$::VERSION = '2.012' ; +$::VERSION = '2.015' ; use private::MakeUtil; use ExtUtils::MakeMaker 5.16 ; diff --git a/ext/IO_Compress_Zlib/README b/ext/IO_Compress_Zlib/README index b962502..a61d40a 100644 --- a/ext/IO_Compress_Zlib/README +++ b/ext/IO_Compress_Zlib/README @@ -1,9 +1,9 @@ IO-Compress-Zlib - Version 2.012 + Version 2.015 - 15th July 2008 + 2nd September 2008 Copyright (c) 2005-2008 Paul Marquess. All rights reserved. This program is free software; you can redistribute it @@ -93,7 +93,7 @@ To help me help you, I need all of the following information: If you haven't installed IO-Compress-Zlib then search IO::Compress::Gzip.pm for a line like this: - $VERSION = "2.012" ; + $VERSION = "2.015" ; 2. If you are having problems building IO-Compress-Zlib, send me a complete log of what happened. Start by unpacking the IO-Compress-Zlib diff --git a/ext/IO_Compress_Zlib/lib/IO/Compress/Adapter/Deflate.pm b/ext/IO_Compress_Zlib/lib/IO/Compress/Adapter/Deflate.pm index fa9e073..4425e36 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Compress/Adapter/Deflate.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Compress/Adapter/Deflate.pm @@ -4,12 +4,12 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.012 qw(:Status); +use IO::Compress::Base::Common 2.015 qw(:Status); -use Compress::Raw::Zlib 2.012 qw(Z_OK Z_FINISH MAX_WBITS) ; +use Compress::Raw::Zlib 2.015 qw(Z_OK Z_FINISH MAX_WBITS) ; our ($VERSION); -$VERSION = '2.012'; +$VERSION = '2.015'; sub mkCompObject { diff --git a/ext/IO_Compress_Zlib/lib/IO/Compress/Adapter/Identity.pm b/ext/IO_Compress_Zlib/lib/IO/Compress/Adapter/Identity.pm index c615797..1b1998e 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Compress/Adapter/Identity.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Compress/Adapter/Identity.pm @@ -4,10 +4,10 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.012 qw(:Status); +use IO::Compress::Base::Common 2.015 qw(:Status); our ($VERSION); -$VERSION = '2.012'; +$VERSION = '2.015'; sub mkCompObject { diff --git a/ext/IO_Compress_Zlib/lib/IO/Compress/Deflate.pm b/ext/IO_Compress_Zlib/lib/IO/Compress/Deflate.pm index 0c94e8f..fae42bf 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Compress/Deflate.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Compress/Deflate.pm @@ -6,16 +6,16 @@ use bytes; require Exporter ; -use IO::Compress::RawDeflate 2.012 ; +use IO::Compress::RawDeflate 2.015 ; -use Compress::Raw::Zlib 2.012 ; -use IO::Compress::Zlib::Constants 2.012 ; -use IO::Compress::Base::Common 2.012 qw(createSelfTiedObject); +use Compress::Raw::Zlib 2.015 ; +use IO::Compress::Zlib::Constants 2.015 ; +use IO::Compress::Base::Common 2.015 qw(createSelfTiedObject); our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $DeflateError); -$VERSION = '2.012'; +$VERSION = '2.015'; $DeflateError = ''; @ISA = qw(Exporter IO::Compress::RawDeflate); diff --git a/ext/IO_Compress_Zlib/lib/IO/Compress/Gzip.pm b/ext/IO_Compress_Zlib/lib/IO/Compress/Gzip.pm index e7a54ea..dfd41e3 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Compress/Gzip.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Compress/Gzip.pm @@ -8,12 +8,12 @@ use warnings; use bytes; -use IO::Compress::RawDeflate 2.012 ; +use IO::Compress::RawDeflate 2.015 ; -use Compress::Raw::Zlib 2.012 ; -use IO::Compress::Base::Common 2.012 qw(:Status :Parse createSelfTiedObject); -use IO::Compress::Gzip::Constants 2.012 ; -use IO::Compress::Zlib::Extra 2.012 ; +use Compress::Raw::Zlib 2.015 ; +use IO::Compress::Base::Common 2.015 qw(:Status :Parse createSelfTiedObject); +use IO::Compress::Gzip::Constants 2.015 ; +use IO::Compress::Zlib::Extra 2.015 ; BEGIN { @@ -27,7 +27,7 @@ require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $GzipError); -$VERSION = '2.012'; +$VERSION = '2.015'; $GzipError = '' ; @ISA = qw(Exporter IO::Compress::RawDeflate); diff --git a/ext/IO_Compress_Zlib/lib/IO/Compress/Gzip/Constants.pm b/ext/IO_Compress_Zlib/lib/IO/Compress/Gzip/Constants.pm index 1a2b35c..ac38b97 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Compress/Gzip/Constants.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Compress/Gzip/Constants.pm @@ -9,7 +9,7 @@ require Exporter; our ($VERSION, @ISA, @EXPORT, %GZIP_OS_Names); our ($GZIP_FNAME_INVALID_CHAR_RE, $GZIP_FCOMMENT_INVALID_CHAR_RE); -$VERSION = '2.012'; +$VERSION = '2.015'; @ISA = qw(Exporter); diff --git a/ext/IO_Compress_Zlib/lib/IO/Compress/RawDeflate.pm b/ext/IO_Compress_Zlib/lib/IO/Compress/RawDeflate.pm index 8f2e36f..5540d4c 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Compress/RawDeflate.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Compress/RawDeflate.pm @@ -7,16 +7,16 @@ use warnings; use bytes; -use IO::Compress::Base 2.012 ; -use IO::Compress::Base::Common 2.012 qw(:Status createSelfTiedObject); -use IO::Compress::Adapter::Deflate 2.012 ; +use IO::Compress::Base 2.015 ; +use IO::Compress::Base::Common 2.015 qw(:Status createSelfTiedObject); +use IO::Compress::Adapter::Deflate 2.015 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %DEFLATE_CONSTANTS, %EXPORT_TAGS, $RawDeflateError); -$VERSION = '2.012'; +$VERSION = '2.015'; $RawDeflateError = ''; @ISA = qw(Exporter IO::Compress::Base); @@ -142,8 +142,8 @@ sub getZlibParams { my $self = shift ; - use IO::Compress::Base::Common 2.012 qw(:Parse); - use Compress::Raw::Zlib 2.012 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); + use IO::Compress::Base::Common 2.015 qw(:Parse); + use Compress::Raw::Zlib 2.015 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); return ( diff --git a/ext/IO_Compress_Zlib/lib/IO/Compress/Zip.pm b/ext/IO_Compress_Zlib/lib/IO/Compress/Zip.pm index 6220d98..976ec48 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Compress/Zip.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Compress/Zip.pm @@ -4,21 +4,21 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base::Common 2.012 qw(:Status createSelfTiedObject); -use IO::Compress::RawDeflate 2.012 ; -use IO::Compress::Adapter::Deflate 2.012 ; -use IO::Compress::Adapter::Identity 2.012 ; -use IO::Compress::Zlib::Extra 2.012 ; -use IO::Compress::Zip::Constants 2.012 ; +use IO::Compress::Base::Common 2.015 qw(:Status createSelfTiedObject); +use IO::Compress::RawDeflate 2.015 ; +use IO::Compress::Adapter::Deflate 2.015 ; +use IO::Compress::Adapter::Identity 2.015 ; +use IO::Compress::Zlib::Extra 2.015 ; +use IO::Compress::Zip::Constants 2.015 ; -use Compress::Raw::Zlib 2.012 qw(crc32) ; +use Compress::Raw::Zlib 2.015 qw(crc32) ; BEGIN { eval { require IO::Compress::Adapter::Bzip2 ; - import IO::Compress::Adapter::Bzip2 2.012 ; + import IO::Compress::Adapter::Bzip2 2.015 ; require IO::Compress::Bzip2 ; - import IO::Compress::Bzip2 2.012 ; + import IO::Compress::Bzip2 2.015 ; } ; } @@ -27,7 +27,7 @@ require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $ZipError); -$VERSION = '2.012'; +$VERSION = '2.015'; $ZipError = ''; @ISA = qw(Exporter IO::Compress::RawDeflate); @@ -452,8 +452,8 @@ sub getExtraParams { my $self = shift ; - use IO::Compress::Base::Common 2.012 qw(:Parse); - use Compress::Raw::Zlib 2.012 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); + use IO::Compress::Base::Common 2.015 qw(:Parse); + use Compress::Raw::Zlib 2.015 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); my @Bzip2 = (); diff --git a/ext/IO_Compress_Zlib/lib/IO/Compress/Zip/Constants.pm b/ext/IO_Compress_Zlib/lib/IO/Compress/Zip/Constants.pm index 5455c37..ead5397 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Compress/Zip/Constants.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Compress/Zip/Constants.pm @@ -7,7 +7,7 @@ require Exporter; our ($VERSION, @ISA, @EXPORT, %ZIP_CM_MIN_VERSIONS); -$VERSION = '2.012'; +$VERSION = '2.015'; @ISA = qw(Exporter); @@ -84,6 +84,7 @@ use constant ZIP_OS_CODE_DEFAULT => 3; use constant ZIP_EXTRA_ID_ZIP64 => pack "v", 1; use constant ZIP_EXTRA_ID_EXT_TIMESTAMP => "UT"; use constant ZIP_EXTRA_ID_INFO_ZIP_UNIX2 => "Ux"; +use constant ZIP_EXTRA_ID_INFO_ZIP_UNIXn => "ux"; use constant ZIP_EXTRA_ID_JAVA_EXE => pack "v", 0xCAFE; use constant ZIP64_MIN_VERSION => 45; diff --git a/ext/IO_Compress_Zlib/lib/IO/Compress/Zlib/Constants.pm b/ext/IO_Compress_Zlib/lib/IO/Compress/Zlib/Constants.pm index 5dbabcb..bf2eb22 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Compress/Zlib/Constants.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Compress/Zlib/Constants.pm @@ -9,7 +9,7 @@ require Exporter; our ($VERSION, @ISA, @EXPORT); -$VERSION = '2.012'; +$VERSION = '2.015'; @ISA = qw(Exporter); diff --git a/ext/IO_Compress_Zlib/lib/IO/Compress/Zlib/Extra.pm b/ext/IO_Compress_Zlib/lib/IO/Compress/Zlib/Extra.pm index e91824e..1c02d18 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Compress/Zlib/Extra.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Compress/Zlib/Extra.pm @@ -8,9 +8,9 @@ use bytes; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS); -$VERSION = '2.012'; +$VERSION = '2.015'; -use IO::Compress::Gzip::Constants 2.012 ; +use IO::Compress::Gzip::Constants 2.015 ; sub ExtraFieldError { diff --git a/ext/IO_Compress_Zlib/lib/IO/Uncompress/Adapter/Identity.pm b/ext/IO_Compress_Zlib/lib/IO/Uncompress/Adapter/Identity.pm index 23859eb..ed96393 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Uncompress/Adapter/Identity.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Uncompress/Adapter/Identity.pm @@ -4,13 +4,13 @@ use warnings; use strict; use bytes; -use IO::Compress::Base::Common 2.012 qw(:Status); +use IO::Compress::Base::Common 2.015 qw(:Status); our ($VERSION); -$VERSION = '2.012'; +$VERSION = '2.015'; -use Compress::Raw::Zlib 2.012 (); +use Compress::Raw::Zlib 2.015 (); sub mkUncompObject { diff --git a/ext/IO_Compress_Zlib/lib/IO/Uncompress/Adapter/Inflate.pm b/ext/IO_Compress_Zlib/lib/IO/Uncompress/Adapter/Inflate.pm index 2308254..d87b9f5 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Uncompress/Adapter/Inflate.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Uncompress/Adapter/Inflate.pm @@ -4,11 +4,11 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.012 qw(:Status); -use Compress::Raw::Zlib 2.012 qw(Z_OK Z_DATA_ERROR Z_STREAM_END Z_FINISH MAX_WBITS); +use IO::Compress::Base::Common 2.015 qw(:Status); +use Compress::Raw::Zlib 2.015 qw(Z_OK Z_DATA_ERROR Z_STREAM_END Z_FINISH MAX_WBITS); our ($VERSION); -$VERSION = '2.012'; +$VERSION = '2.015'; diff --git a/ext/IO_Compress_Zlib/lib/IO/Uncompress/AnyInflate.pm b/ext/IO_Compress_Zlib/lib/IO/Uncompress/AnyInflate.pm index 7cf8a59..f350f32 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Uncompress/AnyInflate.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Uncompress/AnyInflate.pm @@ -6,22 +6,22 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.012 qw(createSelfTiedObject); +use IO::Compress::Base::Common 2.015 qw(createSelfTiedObject); -use IO::Uncompress::Adapter::Inflate 2.012 (); +use IO::Uncompress::Adapter::Inflate 2.015 (); -use IO::Uncompress::Base 2.012 ; -use IO::Uncompress::Gunzip 2.012 ; -use IO::Uncompress::Inflate 2.012 ; -use IO::Uncompress::RawInflate 2.012 ; -use IO::Uncompress::Unzip 2.012 ; +use IO::Uncompress::Base 2.015 ; +use IO::Uncompress::Gunzip 2.015 ; +use IO::Uncompress::Inflate 2.015 ; +use IO::Uncompress::RawInflate 2.015 ; +use IO::Uncompress::Unzip 2.015 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyInflateError); -$VERSION = '2.012'; +$VERSION = '2.015'; $AnyInflateError = ''; @ISA = qw( Exporter IO::Uncompress::Base ); @@ -48,7 +48,7 @@ sub anyinflate sub getExtraParams { - use IO::Compress::Base::Common 2.012 qw(:Parse); + use IO::Compress::Base::Common 2.015 qw(:Parse); return ( 'RawInflate' => [1, 1, Parse_boolean, 0] ) ; } diff --git a/ext/IO_Compress_Zlib/lib/IO/Uncompress/Gunzip.pm b/ext/IO_Compress_Zlib/lib/IO/Uncompress/Gunzip.pm index b298594..72dd5cf 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Uncompress/Gunzip.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Uncompress/Gunzip.pm @@ -9,12 +9,12 @@ use strict ; use warnings; use bytes; -use IO::Uncompress::RawInflate 2.012 ; +use IO::Uncompress::RawInflate 2.015 ; -use Compress::Raw::Zlib 2.012 qw( crc32 ) ; -use IO::Compress::Base::Common 2.012 qw(:Status createSelfTiedObject); -use IO::Compress::Gzip::Constants 2.012 ; -use IO::Compress::Zlib::Extra 2.012 ; +use Compress::Raw::Zlib 2.015 qw( crc32 ) ; +use IO::Compress::Base::Common 2.015 qw(:Status createSelfTiedObject); +use IO::Compress::Gzip::Constants 2.015 ; +use IO::Compress::Zlib::Extra 2.015 ; require Exporter ; @@ -28,7 +28,7 @@ Exporter::export_ok_tags('all'); $GunzipError = ''; -$VERSION = '2.012'; +$VERSION = '2.015'; sub new { @@ -47,7 +47,7 @@ sub gunzip sub getExtraParams { - use IO::Compress::Base::Common 2.012 qw(:Parse); + use IO::Compress::Base::Common 2.015 qw(:Parse); return ( 'ParseExtra' => [1, 1, Parse_boolean, 0] ) ; } diff --git a/ext/IO_Compress_Zlib/lib/IO/Uncompress/Inflate.pm b/ext/IO_Compress_Zlib/lib/IO/Uncompress/Inflate.pm index f369d29..23fe2db 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Uncompress/Inflate.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Uncompress/Inflate.pm @@ -5,15 +5,15 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base::Common 2.012 qw(:Status createSelfTiedObject); -use IO::Compress::Zlib::Constants 2.012 ; +use IO::Compress::Base::Common 2.015 qw(:Status createSelfTiedObject); +use IO::Compress::Zlib::Constants 2.015 ; -use IO::Uncompress::RawInflate 2.012 ; +use IO::Uncompress::RawInflate 2.015 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $InflateError); -$VERSION = '2.012'; +$VERSION = '2.015'; $InflateError = ''; @ISA = qw( Exporter IO::Uncompress::RawInflate ); diff --git a/ext/IO_Compress_Zlib/lib/IO/Uncompress/RawInflate.pm b/ext/IO_Compress_Zlib/lib/IO/Uncompress/RawInflate.pm index 50c646c..def05a8 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Uncompress/RawInflate.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Uncompress/RawInflate.pm @@ -5,11 +5,11 @@ use strict ; use warnings; use bytes; -use Compress::Raw::Zlib 2.012 ; -use IO::Compress::Base::Common 2.012 qw(:Status createSelfTiedObject); +use Compress::Raw::Zlib 2.015 ; +use IO::Compress::Base::Common 2.015 qw(:Status createSelfTiedObject); -use IO::Uncompress::Base 2.012 ; -use IO::Uncompress::Adapter::Inflate 2.012 ; +use IO::Uncompress::Base 2.015 ; +use IO::Uncompress::Adapter::Inflate 2.015 ; @@ -17,7 +17,7 @@ use IO::Uncompress::Adapter::Inflate 2.012 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $RawInflateError); -$VERSION = '2.012'; +$VERSION = '2.015'; $RawInflateError = ''; @ISA = qw( Exporter IO::Uncompress::Base ); diff --git a/ext/IO_Compress_Zlib/lib/IO/Uncompress/Unzip.pm b/ext/IO_Compress_Zlib/lib/IO/Uncompress/Unzip.pm index 16be675..6ba7644 100644 --- a/ext/IO_Compress_Zlib/lib/IO/Uncompress/Unzip.pm +++ b/ext/IO_Compress_Zlib/lib/IO/Uncompress/Unzip.pm @@ -8,14 +8,14 @@ use strict ; use warnings; use bytes; -use IO::Uncompress::RawInflate 2.012 ; -use IO::Compress::Base::Common 2.012 qw(:Status createSelfTiedObject); -use IO::Uncompress::Adapter::Inflate 2.012 ; -use IO::Uncompress::Adapter::Identity 2.012 ; -use IO::Compress::Zlib::Extra 2.012 ; -use IO::Compress::Zip::Constants 2.012 ; +use IO::Uncompress::RawInflate 2.015 ; +use IO::Compress::Base::Common 2.015 qw(:Status createSelfTiedObject); +use IO::Uncompress::Adapter::Inflate 2.015 ; +use IO::Uncompress::Adapter::Identity 2.015 ; +use IO::Compress::Zlib::Extra 2.015 ; +use IO::Compress::Zip::Constants 2.015 ; -use Compress::Raw::Zlib 2.012 qw(crc32) ; +use Compress::Raw::Zlib 2.015 qw(crc32) ; BEGIN { @@ -28,7 +28,7 @@ require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $UnzipError, %headerLookup); -$VERSION = '2.012'; +$VERSION = '2.015'; $UnzipError = ''; @ISA = qw(Exporter IO::Uncompress::RawInflate); @@ -61,7 +61,7 @@ sub unzip sub getExtraParams { - use IO::Compress::Base::Common 2.012 qw(:Parse); + use IO::Compress::Base::Common 2.015 qw(:Parse); return ( diff --git a/ext/IO_Compress_Zlib/private/MakeUtil.pm b/ext/IO_Compress_Zlib/private/MakeUtil.pm index 4c706e0..e595910 100644 --- a/ext/IO_Compress_Zlib/private/MakeUtil.pm +++ b/ext/IO_Compress_Zlib/private/MakeUtil.pm @@ -297,6 +297,83 @@ sub doUpDownViaCopy } } + +sub FindBrokenDependencies +{ + my $version = shift ; + my %thisModule = map { $_ => 1} @_; + + my @modules = qw( + IO::Compress::Base + IO::Compress::Base::Common + IO::Uncompress::Base + + Compress::Raw::Zlib + Compress::Raw::Bzip2 + + IO::Compress::RawDeflate + IO::Uncompress::RawInflate + IO::Compress::Deflate + IO::Uncompress::Inflate + IO::Compress::Gzip + IO::Compress::Gzip::Constants + IO::Uncompress::Gunzip + IO::Compress::Zip + IO::Uncompress::Unzip + + IO::Compress::Bzip2 + IO::Uncompress::Bunzip2 + + IO::Compress::Lzf + IO::Uncompress::UnLzf + + IO::Compress::Lzop + IO::Uncompress::UnLzop + + Compress::Zlib + ); + + my @broken = (); + + foreach my $module ( grep { ! $thisModule{$_} } @modules) + { + my $hasVersion = getInstalledVersion($module); + + # No need to upgrade if the module isn't installed at all + next + if ! defined $hasVersion; + + # If already have C::Z version 1, then an upgrade to any of the + # IO::Compress modules will not break it. + next + if $module eq 'Compress::Zlib' && $hasVersion < 2; + + if ($hasVersion < $version) + { + push @broken, $module + } + } + + return @broken; +} + +sub getInstalledVersion +{ + my $module = shift; + my $version; + + eval " require $module; "; + + if ($@ eq '') + { + no strict 'refs'; + $version = ${ $module . "::VERSION" }; + $version = 0 + } + + return $version; +} + package MakeUtil ; 1;