diff options
39 files changed, 410 insertions, 221 deletions
@@ -1348,6 +1348,7 @@ cpan/IO-Compress/t/110encode-deflate.t IO::Compress cpan/IO-Compress/t/110encode-gzip.t IO::Compress cpan/IO-Compress/t/110encode-rawdeflate.t IO::Compress cpan/IO-Compress/t/110encode-zip.t IO::Compress +cpan/IO-Compress/t/111const-deflate.t IO::Compress cpan/IO-Compress/t/999pod.t IO::Compress cpan/IO-Compress/t/compress/any.pl Compress::Zlib cpan/IO-Compress/t/compress/anyunc.pl Compress::Zlib diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 009b6459e9..40163a6d95 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1005,7 +1005,7 @@ use File::Glob qw(:case); 'IO-Compress' => { 'MAINTAINER' => 'pmqs', - 'DISTRIBUTION' => 'PMQS/IO-Compress-2.046.tar.gz', + 'DISTRIBUTION' => 'PMQS/IO-Compress-2.047.tar.gz', 'FILES' => q[cpan/IO-Compress], 'EXCLUDED' => [qr{t/Test/}], 'UPSTREAM' => 'cpan', diff --git a/cpan/IO-Compress/Changes b/cpan/IO-Compress/Changes index 0d00b000c7..cab9b13807 100644 --- a/cpan/IO-Compress/Changes +++ b/cpan/IO-Compress/Changes @@ -1,6 +1,16 @@ CHANGES ------- + 2.047 28 January 2012 + + * Set minimum Perl version to 5.6 + + * IO::Compress::Zip + - In one-shot zip, set the Text Flag if "-T" thinks the file is a + text file. + - In one-shot mode, wrote mod time & access time in wrong order + in the "UT" extended field. + 2.046 18 December 2011 * Minor update to bin/zipdetails diff --git a/cpan/IO-Compress/Makefile.PL b/cpan/IO-Compress/Makefile.PL index 84706258b2..62231a9a64 100644 --- a/cpan/IO-Compress/Makefile.PL +++ b/cpan/IO-Compress/Makefile.PL @@ -1,9 +1,9 @@ #! perl -w use strict ; -require 5.004 ; +require 5.006 ; -$::VERSION = '2.045' ; +$::VERSION = '2.047' ; use private::MakeUtil; use ExtUtils::MakeMaker 5.16 ; diff --git a/cpan/IO-Compress/README b/cpan/IO-Compress/README index e13ea76a7b..c692f7cb42 100644 --- a/cpan/IO-Compress/README +++ b/cpan/IO-Compress/README @@ -1,11 +1,11 @@ IO-Compress - Version 2.046 + Version 2.047 - 18th December 2011 + 28th January 2012 - Copyright (c) 1995-2011 Paul Marquess. All rights reserved. + Copyright (c) 1995-2012 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. @@ -89,7 +89,7 @@ To help me help you, I need all of the following information: If you haven't installed IO-Compress then search IO::Compress::Gzip.pm for a line like this: - $VERSION = "2.045" ; + $VERSION = "2.047" ; 2. If you are having problems building IO-Compress, send me a complete log of what happened. Start by unpacking the IO-Compress diff --git a/cpan/IO-Compress/bin/zipdetails b/cpan/IO-Compress/bin/zipdetails index 6e405f3c8e..2b5cd52cec 100644 --- a/cpan/IO-Compress/bin/zipdetails +++ b/cpan/IO-Compress/bin/zipdetails @@ -2106,7 +2106,7 @@ Paul Marquess F<pmqs@cpan.org>. =head1 COPYRIGHT -Copyright (c) 2011 Paul Marquess. All rights reserved. +Copyright (c) 2011-2012 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/cpan/IO-Compress/lib/Compress/Zlib.pm b/cpan/IO-Compress/lib/Compress/Zlib.pm index 16f0cfa243..8d340290aa 100644 --- a/cpan/IO-Compress/lib/Compress/Zlib.pm +++ b/cpan/IO-Compress/lib/Compress/Zlib.pm @@ -1,23 +1,23 @@ package Compress::Zlib; -require 5.004 ; +require 5.006 ; require Exporter; use Carp ; use IO::Handle ; use Scalar::Util qw(dualvar); -use IO::Compress::Base::Common 2.045 ; -use Compress::Raw::Zlib 2.045 ; -use IO::Compress::Gzip 2.045 ; -use IO::Uncompress::Gunzip 2.045 ; +use IO::Compress::Base::Common 2.047 ; +use Compress::Raw::Zlib 2.047 ; +use IO::Compress::Gzip 2.047 ; +use IO::Uncompress::Gunzip 2.047 ; use strict ; use warnings ; use bytes ; our ($VERSION, $XS_VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); -$VERSION = '2.045'; +$VERSION = '2.047'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -453,7 +453,7 @@ sub inflate package Compress::Zlib ; -use IO::Compress::Gzip::Constants 2.045 ; +use IO::Compress::Gzip::Constants 2.047 ; sub memGzip($) { @@ -578,7 +578,7 @@ sub memGunzip($) substr($$string, 0, 8) = ''; return _set_gzerr_undef(Z_DATA_ERROR()) unless $len == length($output) and - $crc == crc32($output); + $crc == Compress::Raw::Zlib::crc32($output); } else { @@ -1478,7 +1478,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 1995-2011 Paul Marquess. All rights reserved. +Copyright (c) 1995-2012 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/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm b/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm index 96ec70d16d..86a55b67b5 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm @@ -4,12 +4,12 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.045 qw(:Status); +use IO::Compress::Base::Common 2.047 qw(:Status); -use Compress::Raw::Bzip2 2.045 ; +use Compress::Raw::Bzip2 2.047 ; our ($VERSION); -$VERSION = '2.045'; +$VERSION = '2.047'; sub mkCompObject { diff --git a/cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm b/cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm index a0a03faa51..0efc862a8b 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm @@ -4,12 +4,18 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.045 qw(:Status); - -use Compress::Raw::Zlib 2.045 qw(Z_OK Z_FINISH MAX_WBITS) ; -our ($VERSION); - -$VERSION = '2.045'; +use IO::Compress::Base::Common 2.047 qw(:Status); +use Compress::Raw::Zlib 2.047 qw( !crc32 !adler32 ) ; + +require Exporter; +our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, @EXPORT, %DEFLATE_CONSTANTS); + +$VERSION = '2.047'; +@ISA = qw(Exporter); +@EXPORT_OK = @Compress::Raw::Zlib::DEFLATE_CONSTANTS; +%EXPORT_TAGS = %Compress::Raw::Zlib::DEFLATE_CONSTANTS; +@EXPORT = @EXPORT_OK; +%DEFLATE_CONSTANTS = %EXPORT_TAGS ; sub mkCompObject { diff --git a/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm b/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm index da04ab6178..2abe738d3e 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm @@ -4,10 +4,10 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.045 qw(:Status); +use IO::Compress::Base::Common 2.047 qw(:Status); our ($VERSION); -$VERSION = '2.045'; +$VERSION = '2.047'; sub mkCompObject { diff --git a/cpan/IO-Compress/lib/IO/Compress/Base.pm b/cpan/IO-Compress/lib/IO/Compress/Base.pm index adcfeccd55..f68c9375d0 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Base.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Base.pm @@ -1,12 +1,12 @@ package IO::Compress::Base ; -require 5.004 ; +require 5.006 ; use strict ; use warnings; -use IO::Compress::Base::Common 2.045 ; +use IO::Compress::Base::Common 2.047 ; use IO::File qw(SEEK_SET SEEK_END); ; use Scalar::Util qw(blessed readonly); @@ -20,7 +20,7 @@ use bytes; our (@ISA, $VERSION); @ISA = qw(Exporter IO::File); -$VERSION = '2.046'; +$VERSION = '2.047'; #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. @@ -703,16 +703,14 @@ sub beforePayload { } -sub newStream +sub _newStream { my $self = shift ; - + my $got = shift; + $self->_writeTrailer() or return 0 ; - my $got = $self->checkParams('newStream', *$self->{Got}, @_) - or return 0 ; - $self->ckParams($got) or $self->croakError("newStream: $self->{Error}"); @@ -731,6 +729,30 @@ sub newStream return 1 ; } +sub newStream +{ + my $self = shift ; + + my $got = $self->checkParams('newStream', *$self->{Got}, @_) + or return 0 ; + + $self->_newStream($got); + +# *$self->{Compress} = $self->mkComp($got) +# or return 0; +# +# *$self->{Header} = $self->mkHeader($got) ; +# $self->output(*$self->{Header} ) +# or return 0; +# +# *$self->{UnCompSize}->reset(); +# *$self->{CompSize}->reset(); +# +# $self->beforePayload(); +# +# return 1 ; +} + sub reset { my $self = shift ; @@ -989,7 +1011,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2011 Paul Marquess. All rights reserved. +Copyright (c) 2005-2012 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/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm b/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm index 0f1c63a234..de078986bd 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm +++ b/cpan/IO-Compress/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.045'; +$VERSION = '2.047'; @EXPORT = qw( isaFilehandle isaFilename isaScalar whatIsInput whatIsOutput @@ -519,6 +519,7 @@ sub ParseParameters #package IO::Compress::Base::Parameters; use strict; + use warnings; use Carp; diff --git a/cpan/IO-Compress/lib/IO/Compress/Bzip2.pm b/cpan/IO-Compress/lib/IO/Compress/Bzip2.pm index 6c11ecb67c..bf38a0aca9 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Bzip2.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Bzip2.pm @@ -5,16 +5,16 @@ use warnings; use bytes; require Exporter ; -use IO::Compress::Base 2.045 ; +use IO::Compress::Base 2.047 ; -use IO::Compress::Base::Common 2.045 qw(createSelfTiedObject); -use IO::Compress::Adapter::Bzip2 2.045 ; +use IO::Compress::Base::Common 2.047 qw(createSelfTiedObject); +use IO::Compress::Adapter::Bzip2 2.047 ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bzip2Error); -$VERSION = '2.045'; +$VERSION = '2.047'; $Bzip2Error = ''; @ISA = qw(Exporter IO::Compress::Base); @@ -51,7 +51,7 @@ sub getExtraParams { my $self = shift ; - use IO::Compress::Base::Common 2.045 qw(:Parse); + use IO::Compress::Base::Common 2.047 qw(:Parse); return ( 'BlockSize100K' => [0, 1, Parse_unsigned, 1], diff --git a/cpan/IO-Compress/lib/IO/Compress/Deflate.pm b/cpan/IO-Compress/lib/IO/Compress/Deflate.pm index 1cf51b89ff..aeb184fd54 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Deflate.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Deflate.pm @@ -1,26 +1,29 @@ package IO::Compress::Deflate ; +require 5.006 ; + use strict ; use warnings; use bytes; require Exporter ; -use IO::Compress::RawDeflate 2.045 ; +use IO::Compress::RawDeflate 2.047 (); +use IO::Compress::Adapter::Deflate 2.047 ; -use Compress::Raw::Zlib 2.045 ; -use IO::Compress::Zlib::Constants 2.045 ; -use IO::Compress::Base::Common 2.045 qw(createSelfTiedObject); +use IO::Compress::Zlib::Constants 2.047 ; +use IO::Compress::Base::Common 2.047 qw(createSelfTiedObject); -our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $DeflateError); +our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $DeflateError); -$VERSION = '2.045'; +$VERSION = '2.047'; $DeflateError = ''; @ISA = qw(Exporter IO::Compress::RawDeflate); @EXPORT_OK = qw( $DeflateError deflate ) ; %EXPORT_TAGS = %IO::Compress::RawDeflate::DEFLATE_CONSTANTS ; + push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ; Exporter::export_ok_tags('all'); @@ -921,7 +924,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2011 Paul Marquess. All rights reserved. +Copyright (c) 2005-2012 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/cpan/IO-Compress/lib/IO/Compress/FAQ.pod b/cpan/IO-Compress/lib/IO/Compress/FAQ.pod index 92be8563b8..d392ff2cc9 100644 --- a/cpan/IO-Compress/lib/IO/Compress/FAQ.pod +++ b/cpan/IO-Compress/lib/IO/Compress/FAQ.pod @@ -590,7 +590,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2011 Paul Marquess. All rights reserved. +Copyright (c) 2005-2012 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/cpan/IO-Compress/lib/IO/Compress/Gzip.pm b/cpan/IO-Compress/lib/IO/Compress/Gzip.pm index 97078a599e..9fecbaffcd 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Gzip.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Gzip.pm @@ -1,19 +1,19 @@ - package IO::Compress::Gzip ; -require 5.004 ; +require 5.006 ; use strict ; use warnings; use bytes; +require Exporter ; -use IO::Compress::RawDeflate 2.045 ; +use IO::Compress::RawDeflate 2.047 () ; +use IO::Compress::Adapter::Deflate 2.047 ; -use Compress::Raw::Zlib 2.045 ; -use IO::Compress::Base::Common 2.045 qw(:Status :Parse isaScalar createSelfTiedObject); -use IO::Compress::Gzip::Constants 2.045 ; -use IO::Compress::Zlib::Extra 2.045 ; +use IO::Compress::Base::Common 2.047 qw(:Status :Parse isaScalar createSelfTiedObject); +use IO::Compress::Gzip::Constants 2.047 ; +use IO::Compress::Zlib::Extra 2.047 ; BEGIN { @@ -23,16 +23,15 @@ BEGIN { *noUTF8 = sub {} } } -require Exporter ; +our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $GzipError); -our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $GzipError); - -$VERSION = '2.045'; +$VERSION = '2.047'; $GzipError = '' ; @ISA = qw(Exporter IO::Compress::RawDeflate); @EXPORT_OK = qw( $GzipError gzip ) ; %EXPORT_TAGS = %IO::Compress::RawDeflate::DEFLATE_CONSTANTS ; + push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ; Exporter::export_ok_tags('all'); @@ -258,7 +257,7 @@ sub mkHeader } # HEADER CRC - $out .= pack("v", crc32($out) & 0x00FF ) if $param->value('HeaderCRC') ; + $out .= pack("v", Compress::Raw::Zlib::crc32($out) & 0x00FF ) if $param->value('HeaderCRC') ; noUTF8($out); @@ -1235,7 +1234,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2011 Paul Marquess. All rights reserved. +Copyright (c) 2005-2012 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/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm b/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm index 7695b2a0e1..98ea27a629 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm +++ b/cpan/IO-Compress/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.045'; +$VERSION = '2.047'; @ISA = qw(Exporter); diff --git a/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm b/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm index 487cd1bee4..9b86ef9c41 100644 --- a/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm +++ b/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm @@ -7,44 +7,23 @@ use warnings; use bytes; -use IO::Compress::Base 2.045 ; -use IO::Compress::Base::Common 2.045 qw(:Status createSelfTiedObject); -use IO::Compress::Adapter::Deflate 2.045 ; +use IO::Compress::Base 2.047 ; +use IO::Compress::Base::Common 2.047 qw(:Status createSelfTiedObject); +use IO::Compress::Adapter::Deflate 2.047 ; require Exporter ; - our ($VERSION, @ISA, @EXPORT_OK, %DEFLATE_CONSTANTS, %EXPORT_TAGS, $RawDeflateError); -$VERSION = '2.045'; +$VERSION = '2.047'; $RawDeflateError = ''; @ISA = qw(Exporter IO::Compress::Base); @EXPORT_OK = qw( $RawDeflateError rawdeflate ) ; +push @EXPORT_OK, @IO::Compress::Adapter::Deflate::EXPORT_OK ; + +%EXPORT_TAGS = %IO::Compress::Adapter::Deflate::DEFLATE_CONSTANTS; -%EXPORT_TAGS = ( flush => [qw{ - Z_NO_FLUSH - Z_PARTIAL_FLUSH - Z_SYNC_FLUSH - Z_FULL_FLUSH - Z_FINISH - Z_BLOCK - }], - level => [qw{ - Z_NO_COMPRESSION - Z_BEST_SPEED - Z_BEST_COMPRESSION - Z_DEFAULT_COMPRESSION - }], - strategy => [qw{ - Z_FILTERED - Z_HUFFMAN_ONLY - Z_RLE - Z_FIXED - Z_DEFAULT_STRATEGY - }], - - ); { my %seen; @@ -60,7 +39,7 @@ $RawDeflateError = ''; %DEFLATE_CONSTANTS = %EXPORT_TAGS; -push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ; +#push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ; Exporter::export_ok_tags('all'); @@ -142,8 +121,8 @@ sub getZlibParams { my $self = shift ; - use IO::Compress::Base::Common 2.045 qw(:Parse); - use Compress::Raw::Zlib 2.045 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); + use IO::Compress::Base::Common 2.047 qw(:Parse); + use Compress::Raw::Zlib 2.047 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); return ( @@ -1008,7 +987,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2011 Paul Marquess. All rights reserved. +Copyright (c) 2005-2012 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/cpan/IO-Compress/lib/IO/Compress/Zip.pm b/cpan/IO-Compress/lib/IO/Compress/Zip.pm index 0e4c957c39..f4ace79615 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Zip.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Zip.pm @@ -4,44 +4,45 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base::Common 2.045 qw(:Status MAX32 isGeMax32 isaScalar createSelfTiedObject); -use IO::Compress::RawDeflate 2.045 ; -use IO::Compress::Adapter::Deflate 2.045 ; -use IO::Compress::Adapter::Identity 2.045 ; -use IO::Compress::Zlib::Extra 2.045 ; -use IO::Compress::Zip::Constants 2.045 ; +use IO::Compress::Base::Common 2.047 qw(:Status MAX32 isGeMax32 isaScalar createSelfTiedObject); +use IO::Compress::RawDeflate 2.047 (); +use IO::Compress::Adapter::Deflate 2.047 ; +use IO::Compress::Adapter::Identity 2.047 ; +use IO::Compress::Zlib::Extra 2.047 ; +use IO::Compress::Zip::Constants 2.047 ; use File::Spec(); use Config; -use Compress::Raw::Zlib 2.045 qw(crc32) ; +use Compress::Raw::Zlib 2.047 (); BEGIN { eval { require IO::Compress::Adapter::Bzip2 ; - import IO::Compress::Adapter::Bzip2 2.045 ; + import IO::Compress::Adapter::Bzip2 2.047 ; require IO::Compress::Bzip2 ; - import IO::Compress::Bzip2 2.045 ; + import IO::Compress::Bzip2 2.047 ; } ; eval { require IO::Compress::Adapter::Lzma ; - import IO::Compress::Adapter::Lzma 2.045 ; + import IO::Compress::Adapter::Lzma 2.047 ; require IO::Compress::Lzma ; - import IO::Compress::Lzma 2.045 ; + import IO::Compress::Lzma 2.047 ; } ; } require Exporter ; -our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $ZipError); +our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $ZipError); -$VERSION = '2.046'; +$VERSION = '2.047'; $ZipError = ''; @ISA = qw(Exporter IO::Compress::RawDeflate); @EXPORT_OK = qw( $ZipError zip ) ; %EXPORT_TAGS = %IO::Compress::RawDeflate::DEFLATE_CONSTANTS ; + push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ; $EXPORT_TAGS{zip_method} = [qw( ZIP_CM_STORE ZIP_CM_DEFLATE ZIP_CM_BZIP2 ZIP_CM_LZMA)]; @@ -64,6 +65,25 @@ sub zip return $obj->_def(@_); } +sub isMethodAvailable +{ + my $method = shift; + + # Store & Deflate are always available + return 1 + if $method == ZIP_CM_STORE || $method == ZIP_CM_DEFLATE ; + + return 1 + if $method == ZIP_CM_BZIP2 and + defined $IO::Compress::Adapter::Bzip2::VERSION; + + return 1 + if $method == ZIP_CM_LZMA and + defined $IO::Compress::Adapter::Lzma::VERSION; + + return 0; +} + sub beforePayload { my $self = shift ; @@ -77,9 +97,9 @@ sub beforePayload *$self->{FH}->seek($sparse, IO::Handle::SEEK_CUR); - *$self->{ZipData}{CRC32} = crc32($NULLS, *$self->{ZipData}{CRC32}) + *$self->{ZipData}{CRC32} = Compress::Raw::Zlib::crc32($NULLS, *$self->{ZipData}{CRC32}) for 1 .. int $sparse / $inc; - *$self->{ZipData}{CRC32} = crc32(substr($NULLS, 0, $sparse % $inc), + *$self->{ZipData}{CRC32} = Compress::Raw::Zlib::crc32(substr($NULLS, 0, $sparse % $inc), *$self->{ZipData}{CRC32}) if $sparse % $inc; } @@ -97,7 +117,7 @@ sub mkComp $got->value('Level'), $got->value('Strategy') ); - *$self->{ZipData}{CRC32} = crc32(undef); + *$self->{ZipData}{CRC32} = Compress::Raw::Zlib::crc32(undef); } elsif (*$self->{ZipData}{Method} == ZIP_CM_DEFLATE) { ($obj, $errstr, $errno) = IO::Compress::Adapter::Deflate::mkCompObject( @@ -113,13 +133,13 @@ sub mkComp $got->value('WorkFactor'), $got->value('Verbosity') ); - *$self->{ZipData}{CRC32} = crc32(undef); + *$self->{ZipData}{CRC32} = Compress::Raw::Zlib::crc32(undef); } elsif (*$self->{ZipData}{Method} == ZIP_CM_LZMA) { ($obj, $errstr, $errno) = IO::Compress::Adapter::Lzma::mkRawZipCompObject($got->value('Preset'), $got->value('Extreme'), ); - *$self->{ZipData}{CRC32} = crc32(undef); + *$self->{ZipData}{CRC32} = Compress::Raw::Zlib::crc32(undef); } return $self->saveErrorString(undef, $errstr, $errno) @@ -154,7 +174,7 @@ sub filterUncompressed *$self->{ZipData}{CRC32} = *$self->{Compress}->crc32(); } else { - *$self->{ZipData}{CRC32} = crc32(${$_[0]}, *$self->{ZipData}{CRC32}); + *$self->{ZipData}{CRC32} = Compress::Raw::Zlib::crc32(${$_[0]}, *$self->{ZipData}{CRC32}); } } @@ -246,6 +266,7 @@ sub mkHeader my $extFileAttr = 0 ; # This code assumes Unix. + # TODO - revisit this $extFileAttr = 0100644 << 16 if $osCode == ZIP_OS_CODE_UNIX ; @@ -259,7 +280,7 @@ sub mkHeader } if (! $param->value('Minimal')) { - if (defined $param->value('exTime')) + if ($param->parsed('MTime')) { $extra .= mkExtendedTime($param->value('MTime'), $param->value('ATime'), @@ -305,10 +326,10 @@ sub mkHeader #$gpFlag |= ZIP_GP_FLAG_LANGUAGE_ENCODING #if $param->value('UTF8') && length($filename) + length($comment); - my $version = $ZIP_CM_MIN_VERSIONS{$method}; $version = ZIP64_MIN_VERSION if ZIP64_MIN_VERSION > $version && *$self->{ZipData}{Zip64}; + my $madeBy = ($param->value('OS_Code') << 8) + $version; my $extract = $version; @@ -643,8 +664,8 @@ sub getExtraParams { my $self = shift ; - use IO::Compress::Base::Common 2.045 qw(:Parse); - use Compress::Raw::Zlib 2.045 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); + use IO::Compress::Base::Common 2.047 qw(:Parse); + use Compress::Raw::Zlib 2.047 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); my @Bzip2 = (); @@ -661,7 +682,7 @@ sub getExtraParams # # Zip header fields 'Minimal' => [0, 1, Parse_boolean, 0], - 'Zip64' => [0, 1, Parse_any, 0], + 'Zip64' => [0, 1, Parse_boolean, 0], 'Comment' => [0, 1, Parse_any, ''], 'ZipComment'=> [0, 1, Parse_any, ''], 'Name' => [0, 1, Parse_any, ''], @@ -713,11 +734,23 @@ sub getFileInfo return ; } - my ($mode, $uid, $gid, $atime, $mtime, $ctime) - = (stat($filename))[2, 4,5, 8,9,10] ; + my ($mode, $uid, $gid, $size, $atime, $mtime, $ctime) ; + if ( $params->parsed('StoreLinks') ) + { + ($mode, $uid, $gid, $size, $atime, $mtime, $ctime) + = (lstat($filename))[2, 4,5,7, 8,9,10] ; + } + else + { + ($mode, $uid, $gid, $size, $atime, $mtime, $ctime) + = (stat($filename))[2, 4,5,7, 8,9,10] ; + } + + $params->value(TextFlag => -T $filename ) + if ! $params->parsed('TextFlag'); $params->value(Zip64 => 1) - if isGeMax32 -s $filename ; + if isGeMax32 $size ; $params->value('Name' => $filename) if ! $params->parsed('Name') ; @@ -730,7 +763,7 @@ sub getFileInfo $params->value('MTime' => $mtime) ; $params->value('ATime' => $atime) ; $params->value('CTime' => undef) ; # No Creation time - $params->value("exTime", [$mtime, $atime, undef]); + # TODO - see if can fillout creation time on non-Unix } # NOTE - Unix specific code alert @@ -807,6 +840,7 @@ sub mkUnixNExtra sub _unixToDosTime # Archive::Zip::Member { my $time_t = shift; + # TODO - add something to cope with unix time < 1980 my ( $sec, $min, $hour, $mday, $mon, $year ) = localtime($time_t); my $dt = 0; @@ -960,10 +994,10 @@ See L<File::GlobMapper|File::GlobMapper> for more details. If the C<$input> parameter is any other type, C<undef> will be returned. In addition, if C<$input> is a simple filename, the default values for -the C<Name>, C<Time>, C<ExtAttr>, C<exUnixN> and C<exTime> options will be sourced from that file. +the C<Name>, C<Time>, C<TextFlag>, C<ExtAttr>, C<exUnixN> and C<exTime> options will be sourced from that file. If you do not want to use these defaults they can be overridden by -explicitly setting the C<Name>, C<Time>, C<ExtAttr>, C<exUnixN> and C<exTime> options or by setting the +explicitly setting the C<Name>, C<Time>, C<TextFlag>, C<ExtAttr>, C<exUnixN> and C<exTime> options or by setting the C<Minimal> parameter. =head3 The C<$output> parameter @@ -1449,6 +1483,9 @@ This parameter controls the setting of a bit in the zip central header. It is used to signal that the data stored in the zip file/buffer is probably text. +In one-shot mode this flag will be set to true if the Perl C<-T> operator thinks +the file contains text. + The default is 0. =item C<< ExtraFieldLocal => $data >> @@ -1907,7 +1944,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2011 Paul Marquess. All rights reserved. +Copyright (c) 2005-2012 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/cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm b/cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm index 89e0a5b507..41ebd78883 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm @@ -7,7 +7,7 @@ require Exporter; our ($VERSION, @ISA, @EXPORT, %ZIP_CM_MIN_VERSIONS); -$VERSION = '2.045'; +$VERSION = '2.047'; @ISA = qw(Exporter); @@ -115,6 +115,7 @@ use constant ZIP64_MIN_VERSION => 45; ZIP_CM_DEFLATE() => 20, ZIP_CM_BZIP2() => 46, ZIP_CM_LZMA() => 63, + ZIP_CM_PPMD() => 63, ); diff --git a/cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm b/cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm index 92a7e85451..6284aa3f5c 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm @@ -9,7 +9,7 @@ require Exporter; our ($VERSION, @ISA, @EXPORT); -$VERSION = '2.045'; +$VERSION = '2.047'; @ISA = qw(Exporter); diff --git a/cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm b/cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm index c6f80c19f9..e71b1e2717 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm @@ -1,6 +1,6 @@ package IO::Compress::Zlib::Extra; -require 5.004 ; +require 5.006 ; use strict ; use warnings; @@ -8,9 +8,9 @@ use bytes; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS); -$VERSION = '2.045'; +$VERSION = '2.047'; -use IO::Compress::Gzip::Constants 2.045 ; +use IO::Compress::Gzip::Constants 2.047 ; sub ExtraFieldError { diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm index c32ad661d7..2a9eb99330 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm @@ -4,12 +4,12 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.045 qw(:Status); +use IO::Compress::Base::Common 2.047 qw(:Status); -use Compress::Raw::Bzip2 2.045 ; +use Compress::Raw::Bzip2 2.047 ; our ($VERSION, @ISA); -$VERSION = '2.045'; +$VERSION = '2.047'; sub mkUncompObject { diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm index 9c3824a1e8..235cd2dc00 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm @@ -4,14 +4,14 @@ use warnings; use strict; use bytes; -use IO::Compress::Base::Common 2.045 qw(:Status); +use IO::Compress::Base::Common 2.047 qw(:Status); use IO::Compress::Zip::Constants ; our ($VERSION); -$VERSION = '2.045'; +$VERSION = '2.047'; -use Compress::Raw::Zlib 2.045 (); +use Compress::Raw::Zlib 2.047 (); sub mkUncompObject { diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm index 29e1ac3cac..b625e364f7 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm @@ -4,11 +4,11 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.045 qw(:Status); -use Compress::Raw::Zlib 2.045 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS); +use IO::Compress::Base::Common 2.047 qw(:Status); +use Compress::Raw::Zlib 2.047 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS); our ($VERSION); -$VERSION = '2.045'; +$VERSION = '2.047'; diff --git a/cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm index 6fb27069c9..a9cfc8872a 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm @@ -6,22 +6,22 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.045 qw(createSelfTiedObject); +use IO::Compress::Base::Common 2.047 qw(createSelfTiedObject); -use IO::Uncompress::Adapter::Inflate 2.045 (); +use IO::Uncompress::Adapter::Inflate 2.047 (); -use IO::Uncompress::Base 2.045 ; -use IO::Uncompress::Gunzip 2.045 ; -use IO::Uncompress::Inflate 2.045 ; -use IO::Uncompress::RawInflate 2.045 ; -use IO::Uncompress::Unzip 2.045 ; +use IO::Uncompress::Base 2.047 ; +use IO::Uncompress::Gunzip 2.047 ; +use IO::Uncompress::Inflate 2.047 ; +use IO::Uncompress::RawInflate 2.047 ; +use IO::Uncompress::Unzip 2.047 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyInflateError); -$VERSION = '2.045'; +$VERSION = '2.047'; $AnyInflateError = ''; @ISA = qw( Exporter IO::Uncompress::Base ); @@ -48,7 +48,7 @@ sub anyinflate sub getExtraParams { - use IO::Compress::Base::Common 2.045 qw(:Parse); + use IO::Compress::Base::Common 2.047 qw(:Parse); return ( 'RawInflate' => [1, 1, Parse_boolean, 0] ) ; } @@ -980,7 +980,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2011 Paul Marquess. All rights reserved. +Copyright (c) 2005-2012 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/cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm b/cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm index 4d4d4b9923..0c8e107b3f 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm @@ -4,16 +4,16 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.045 qw(createSelfTiedObject); +use IO::Compress::Base::Common 2.047 qw(createSelfTiedObject); -use IO::Uncompress::Base 2.045 ; +use IO::Uncompress::Base 2.047 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyUncompressError); -$VERSION = '2.045'; +$VERSION = '2.047'; $AnyUncompressError = ''; @ISA = qw( Exporter IO::Uncompress::Base ); @@ -27,22 +27,22 @@ Exporter::export_ok_tags('all'); BEGIN { - eval ' use IO::Uncompress::Adapter::Inflate 2.045 ;'; - eval ' use IO::Uncompress::Adapter::Bunzip2 2.045 ;'; - eval ' use IO::Uncompress::Adapter::LZO 2.045 ;'; - eval ' use IO::Uncompress::Adapter::Lzf 2.045 ;'; - eval ' use IO::Uncompress::Adapter::UnLzma 2.045 ;'; - eval ' use IO::Uncompress::Adapter::UnXz 2.045 ;'; - - eval ' use IO::Uncompress::Bunzip2 2.045 ;'; - eval ' use IO::Uncompress::UnLzop 2.045 ;'; - eval ' use IO::Uncompress::Gunzip 2.045 ;'; - eval ' use IO::Uncompress::Inflate 2.045 ;'; - eval ' use IO::Uncompress::RawInflate 2.045 ;'; - eval ' use IO::Uncompress::Unzip 2.045 ;'; - eval ' use IO::Uncompress::UnLzf 2.045 ;'; - eval ' use IO::Uncompress::UnLzma 2.045 ;'; - eval ' use IO::Uncompress::UnXz 2.045 ;'; + eval ' use IO::Uncompress::Adapter::Inflate 2.047 ;'; + eval ' use IO::Uncompress::Adapter::Bunzip2 2.047 ;'; + eval ' use IO::Uncompress::Adapter::LZO 2.047 ;'; + eval ' use IO::Uncompress::Adapter::Lzf 2.047 ;'; + eval ' use IO::Uncompress::Adapter::UnLzma 2.047 ;'; + eval ' use IO::Uncompress::Adapter::UnXz 2.047 ;'; + + eval ' use IO::Uncompress::Bunzip2 2.047 ;'; + eval ' use IO::Uncompress::UnLzop 2.047 ;'; + eval ' use IO::Uncompress::Gunzip 2.047 ;'; + eval ' use IO::Uncompress::Inflate 2.047 ;'; + eval ' use IO::Uncompress::RawInflate 2.047 ;'; + eval ' use IO::Uncompress::Unzip 2.047 ;'; + eval ' use IO::Uncompress::UnLzf 2.047 ;'; + eval ' use IO::Uncompress::UnLzma 2.047 ;'; + eval ' use IO::Uncompress::UnXz 2.047 ;'; } sub new @@ -60,7 +60,7 @@ sub anyuncompress sub getExtraParams { - use IO::Compress::Base::Common 2.045 qw(:Parse); + use IO::Compress::Base::Common 2.047 qw(:Parse); return ( 'RawInflate' => [1, 1, Parse_boolean, 0] , 'UnLzma' => [1, 1, Parse_boolean, 0] ) ; } @@ -1011,7 +1011,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2011 Paul Marquess. All rights reserved. +Copyright (c) 2005-2012 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/cpan/IO-Compress/lib/IO/Uncompress/Base.pm b/cpan/IO-Compress/lib/IO/Uncompress/Base.pm index 973d41b19e..2415a61957 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Base.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Base.pm @@ -9,12 +9,12 @@ our (@ISA, $VERSION, @EXPORT_OK, %EXPORT_TAGS); @ISA = qw(Exporter IO::File); -$VERSION = '2.046'; +$VERSION = '2.047'; use constant G_EOF => 0 ; use constant G_ERR => -1 ; -use IO::Compress::Base::Common 2.045 ; +use IO::Compress::Base::Common 2.047 ; use IO::File ; use Symbol; @@ -1520,7 +1520,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2011 Paul Marquess. All rights reserved. +Copyright (c) 2005-2012 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/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm b/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm index c1e65a5f62..892ccfb547 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm @@ -4,15 +4,15 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base::Common 2.045 qw(:Status createSelfTiedObject); +use IO::Compress::Base::Common 2.047 qw(:Status createSelfTiedObject); -use IO::Uncompress::Base 2.045 ; -use IO::Uncompress::Adapter::Bunzip2 2.045 ; +use IO::Uncompress::Base 2.047 ; +use IO::Uncompress::Adapter::Bunzip2 2.047 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bunzip2Error); -$VERSION = '2.045'; +$VERSION = '2.047'; $Bunzip2Error = ''; @ISA = qw( Exporter IO::Uncompress::Base ); @@ -40,7 +40,7 @@ sub getExtraParams { my $self = shift ; - use IO::Compress::Base::Common 2.045 qw(:Parse); + use IO::Compress::Base::Common 2.047 qw(:Parse); return ( 'Verbosity' => [1, 1, Parse_boolean, 0], diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm b/cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm index 7589fe4dad..96fc585f5f 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm @@ -1,7 +1,7 @@ package IO::Uncompress::Gunzip ; -require 5.004 ; +require 5.006 ; # for RFC1952 @@ -9,12 +9,12 @@ use strict ; use warnings; use bytes; -use IO::Uncompress::RawInflate 2.045 ; +use IO::Uncompress::RawInflate 2.047 ; -use Compress::Raw::Zlib 2.045 qw( crc32 ) ; -use IO::Compress::Base::Common 2.045 qw(:Status createSelfTiedObject); -use IO::Compress::Gzip::Constants 2.045 ; -use IO::Compress::Zlib::Extra 2.045 ; +use Compress::Raw::Zlib 2.047 () ; +use IO::Compress::Base::Common 2.047 qw(:Status createSelfTiedObject); +use IO::Compress::Gzip::Constants 2.047 ; +use IO::Compress::Zlib::Extra 2.047 ; require Exporter ; @@ -28,7 +28,7 @@ Exporter::export_ok_tags('all'); $GunzipError = ''; -$VERSION = '2.045'; +$VERSION = '2.047'; sub new { @@ -47,7 +47,7 @@ sub gunzip sub getExtraParams { - use IO::Compress::Base::Common 2.045 qw(:Parse); + use IO::Compress::Base::Common 2.047 qw(:Parse); return ( 'ParseExtra' => [1, 1, Parse_boolean, 0] ) ; } @@ -222,7 +222,7 @@ sub _readGzipHeader($) or return $self->TruncatedHeader("FHCRC"); $HeaderCRC = unpack("v", $buffer) ; - my $crc16 = crc32($keep) & 0xFF ; + my $crc16 = Compress::Raw::Zlib::crc32($keep) & 0xFF ; return $self->HeaderError("CRC16 mismatch.") if *$self->{Strict} && $crc16 != $HeaderCRC; @@ -1104,7 +1104,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2011 Paul Marquess. All rights reserved. +Copyright (c) 2005-2012 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/cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm index ade1bdadff..abad7d0da6 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm @@ -5,15 +5,15 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base::Common 2.045 qw(:Status createSelfTiedObject); -use IO::Compress::Zlib::Constants 2.045 ; +use IO::Compress::Base::Common 2.047 qw(:Status createSelfTiedObject); +use IO::Compress::Zlib::Constants 2.047 ; -use IO::Uncompress::RawInflate 2.045 ; +use IO::Uncompress::RawInflate 2.047 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $InflateError); -$VERSION = '2.045'; +$VERSION = '2.047'; $InflateError = ''; @ISA = qw( Exporter IO::Uncompress::RawInflate ); @@ -975,7 +975,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2011 Paul Marquess. All rights reserved. +Copyright (c) 2005-2012 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/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm index 102ca9aba0..c73d48d1f3 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm @@ -5,16 +5,16 @@ use strict ; use warnings; use bytes; -use Compress::Raw::Zlib 2.045 ; -use IO::Compress::Base::Common 2.045 qw(:Status createSelfTiedObject); +use Compress::Raw::Zlib 2.047 ; +use IO::Compress::Base::Common 2.047 qw(:Status createSelfTiedObject); -use IO::Uncompress::Base 2.045 ; -use IO::Uncompress::Adapter::Inflate 2.045 ; +use IO::Uncompress::Base 2.047 ; +use IO::Uncompress::Adapter::Inflate 2.047 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $RawInflateError); -$VERSION = '2.045'; +$VERSION = '2.047'; $RawInflateError = ''; @ISA = qw( Exporter IO::Uncompress::Base ); @@ -1103,7 +1103,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2011 Paul Marquess. All rights reserved. +Copyright (c) 2005-2012 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/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm b/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm index de6eca5a3a..6476655999 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm @@ -1,6 +1,6 @@ package IO::Uncompress::Unzip; -require 5.004 ; +require 5.006 ; # for RFC1952 @@ -9,14 +9,14 @@ use warnings; use bytes; use IO::File; -use IO::Uncompress::RawInflate 2.045 ; -use IO::Compress::Base::Common 2.045 qw(:Status createSelfTiedObject); -use IO::Uncompress::Adapter::Inflate 2.045 ; -use IO::Uncompress::Adapter::Identity 2.045 ; -use IO::Compress::Zlib::Extra 2.045 ; -use IO::Compress::Zip::Constants 2.045 ; +use IO::Uncompress::RawInflate 2.047 ; +use IO::Compress::Base::Common 2.047 qw(:Status createSelfTiedObject); +use IO::Uncompress::Adapter::Inflate 2.047 ; +use IO::Uncompress::Adapter::Identity 2.047 ; +use IO::Compress::Zlib::Extra 2.047 ; +use IO::Compress::Zip::Constants 2.047 ; -use Compress::Raw::Zlib 2.045 qw(crc32) ; +use Compress::Raw::Zlib 2.047 () ; BEGIN { @@ -31,7 +31,7 @@ require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $UnzipError, %headerLookup); -$VERSION = '2.046'; +$VERSION = '2.047'; $UnzipError = ''; @ISA = qw(Exporter IO::Uncompress::RawInflate); @@ -64,7 +64,7 @@ sub unzip sub getExtraParams { - use IO::Compress::Base::Common 2.045 qw(:Parse); + use IO::Compress::Base::Common 2.047 qw(:Parse); return ( @@ -73,7 +73,7 @@ sub getExtraParams 'Stream' => [1, 1, Parse_boolean, 0], - # This means reading the central directory to get + # TODO - This means reading the central directory to get # 1. the local header offsets # 2. The compressed data length ); @@ -629,7 +629,7 @@ sub _readZipHeader($) *$self->{CompressedInputLength} = $compressedLength->get64bit(); } - *$self->{ZipData}{CRC32} = crc32(undef); + *$self->{ZipData}{CRC32} = Compress::Raw::Zlib::crc32(undef); *$self->{ZipData}{Method} = $compressedMethod; if ($compressedMethod == ZIP_CM_DEFLATE) { @@ -745,7 +745,7 @@ sub filterUncompressed *$self->{ZipData}{CRC32} = *$self->{Uncomp}->crc32() ; } else { - *$self->{ZipData}{CRC32} = crc32(${$_[0]}, *$self->{ZipData}{CRC32}, $_[1]); + *$self->{ZipData}{CRC32} = Compress::Raw::Zlib::crc32(${$_[0]}, *$self->{ZipData}{CRC32}, $_[1]); } } @@ -1841,7 +1841,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2011 Paul Marquess. All rights reserved. +Copyright (c) 2005-2012 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/cpan/IO-Compress/t/000prereq.t b/cpan/IO-Compress/t/000prereq.t index ad8aac2728..5335953dc4 100644 --- a/cpan/IO-Compress/t/000prereq.t +++ b/cpan/IO-Compress/t/000prereq.t @@ -25,7 +25,7 @@ BEGIN if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; - my $VERSION = '2.045'; + my $VERSION = '2.047'; my @NAMES = qw( Compress::Raw::Bzip2 Compress::Raw::Zlib diff --git a/cpan/IO-Compress/t/006zip.t b/cpan/IO-Compress/t/006zip.t index c79db5b580..b4d1e649fb 100644 --- a/cpan/IO-Compress/t/006zip.t +++ b/cpan/IO-Compress/t/006zip.t @@ -19,7 +19,7 @@ BEGIN { $extra = 1 if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; - plan tests => 91 + $extra ; + plan tests => 95 + $extra ; use_ok('IO::Compress::Zip', qw(:all)) ; use_ok('IO::Uncompress::Unzip', qw(unzip $UnzipError)) ; @@ -320,3 +320,13 @@ for my $method (ZIP_CM_DEFLATE, ZIP_CM_STORE, ZIP_CM_BZIP2) } + +{ + title "isMethodAvailable" ; + + ok IO::Compress::Zip::isMethodAvailable(ZIP_CM_STORE), "ZIP_CM_STORE available"; + ok IO::Compress::Zip::isMethodAvailable(ZIP_CM_DEFLATE), "ZIP_CM_DEFLATE available"; + #ok IO::Compress::Zip::isMethodAvailable(ZIP_CM_STORE), "ZIP_CM_STORE available"; + + ok ! IO::Compress::Zip::isMethodAvailable(999), "999 not available"; +} diff --git a/cpan/IO-Compress/t/111const-deflate.t b/cpan/IO-Compress/t/111const-deflate.t new file mode 100644 index 0000000000..4b9c0304a1 --- /dev/null +++ b/cpan/IO-Compress/t/111const-deflate.t @@ -0,0 +1,81 @@ +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 => 355 + $extra ; +} + + +{ + use Compress::Raw::Zlib; + + my @all = @Compress::Raw::Zlib::DEFLATE_CONSTANTS; + my $pkg = 1; + + for my $module ( qw( Adapter::Deflate RawDeflate Deflate Gzip Zip )) + { + ++ $pkg ; + eval <<EOM; + package P$pkg; + use Test::More ; + use CompTestUtils; + + use IO::Compress::$module () ; + + ::title "IO::Compress::$module - no import" ; +EOM + is $@, "", "create package P$pkg"; + for my $symbol (@Compress::Raw::Zlib::DEFLATE_CONSTANTS) + { + eval "package P$pkg; defined IO::Compress::${module}::$symbol ;"; + is $@, "", " has $symbol"; + } + } + + for my $module ( qw( Adapter::Deflate RawDeflate Deflate Gzip Zip )) + { + for my $label (keys %Compress::Raw::Zlib::DEFLATE_CONSTANTS) + { + ++ $pkg ; + + eval <<EOM; + package P$pkg; + use Test::More ; + use CompTestUtils; + + use IO::Compress::$module qw(:$label) ; + + ::title "IO::Compress::$module - import :$label" ; + +EOM + is $@, "", "create package P$pkg"; + + for my $symbol (@{ $Compress::Raw::Zlib::DEFLATE_CONSTANTS{$label} } ) + { + eval "package P$pkg; defined $symbol ;"; + is $@, "", " has $symbol"; + + } + } + } + +} + diff --git a/cpan/IO-Compress/t/cz-03zlib-v1.t b/cpan/IO-Compress/t/cz-03zlib-v1.t index 5f7a3d7764..8b804cbee9 100644 --- a/cpan/IO-Compress/t/cz-03zlib-v1.t +++ b/cpan/IO-Compress/t/cz-03zlib-v1.t @@ -23,10 +23,10 @@ BEGIN my $count = 0 ; if ($] < 5.005) { - $count = 445 ; + $count = 453 ; } else { - $count = 456 ; + $count = 464 ; } @@ -1227,3 +1227,24 @@ sub trickle ok ! $fil->gzflush(), "flush ok" ; ok ! $fil->gzclose(), "Closed"; } + + + +{ + title "repeated calls to flush"; + + my $hello = "I am a HAL 9000 computer" ; + my ($err, $x, $X, $status); + + ok( ($x, $err) = deflateInit ( ), "Create deflate object" ); + isa_ok $x, "Compress::Raw::Zlib::deflateStream" ; + 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_SYNC_FLUSH), '==', Z_OK, "flush returned Z_OK" ; + $X = ''; + cmp_ok $x->flush($X, Z_SYNC_FLUSH), '==', Z_OK, "second flush returned Z_OK" ; + is $X, "", "no output from second flush"; +} diff --git a/cpan/IO-Compress/t/cz-14gzopen.t b/cpan/IO-Compress/t/cz-14gzopen.t index 5d0f1fbd08..0918ce5482 100644 --- a/cpan/IO-Compress/t/cz-14gzopen.t +++ b/cpan/IO-Compress/t/cz-14gzopen.t @@ -20,7 +20,7 @@ BEGIN { $extra = 1 if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; - plan tests => 255 + $extra ; + plan tests => 260 + $extra ; use_ok('Compress::Zlib', 2) ; use_ok('IO::Compress::Gzip::Constants') ; @@ -649,3 +649,17 @@ foreach my $stdio ( ['-', '-'], [*STDIN, *STDOUT]) is $/, $delim, ' $/ unchanged by gzreadline'; } } + +{ + title 'gzflush called twice'; + + my $lex = new LexFile my $name ; + + ok my $a = gzopen($name, "w"); + my $text = "fred\n"; + my $len = length $text; + is $a->gzwrite($text), length($text), "gzwrite ok"; + + is $a->gzflush(Z_SYNC_FLUSH), Z_OK, "gzflush returns Z_OK"; + is $a->gzflush(Z_SYNC_FLUSH), Z_OK, "gzflush returns Z_OK"; +} diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 7d02367da1..2e63e7ed3a 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -121,6 +121,10 @@ L<Compress::Raw::Zlib> has been upgraded from version 2.045 to version 2.047. =item * +L<Compress::Zlib> has been upgraded from version 2.046 to version 2.047. + +=item * + L<DB_File> has been upgraded from version 1.824 to version 1.826. =item * |