summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorPaul Marquess <pmqs@cpan.org>2009-03-30 08:17:04 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-30 11:11:37 +0200
commitdc82791df0cbbf94f0821266b58cedd3897d8ee5 (patch)
treec75c7a70d7b44617407969ed041daa6adaebd838 /ext
parent4f8ea571d59902220616f04ae08685631ed3e685 (diff)
downloadperl-dc82791df0cbbf94f0821266b58cedd3897d8ee5.tar.gz
Updates for ext/compress*
Diffstat (limited to 'ext')
-rw-r--r--ext/Compress-Raw-Bzip2/Changes4
-rw-r--r--ext/Compress-Raw-Bzip2/Makefile.PL9
-rw-r--r--ext/Compress-Raw-Bzip2/README2
-rw-r--r--ext/Compress-Raw-Bzip2/t/000prereq.t2
-rw-r--r--ext/Compress-Raw-Zlib/Changes4
-rw-r--r--ext/Compress-Raw-Zlib/Makefile.PL13
-rw-r--r--ext/Compress-Raw-Zlib/README2
-rw-r--r--ext/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm276
-rw-r--r--ext/IO-Compress/Changes18
-rw-r--r--ext/IO-Compress/Makefile.PL10
-rw-r--r--ext/IO-Compress/README15
-rwxr-xr-xext/IO-Compress/examples/io/bzip2/bzcat2
-rwxr-xr-xext/IO-Compress/examples/io/bzip2/bzgrep2
-rwxr-xr-xext/IO-Compress/examples/io/bzip2/bzstream2
-rw-r--r--ext/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm6
-rw-r--r--ext/IO-Compress/lib/IO/Compress/Bzip2.pm10
-rw-r--r--ext/IO-Compress/lib/IO/Compress/Zip.pm4
-rw-r--r--ext/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm6
-rw-r--r--ext/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm4
-rw-r--r--ext/IO-Compress/lib/IO/Uncompress/Bunzip2.pm10
-rw-r--r--ext/IO-Compress/lib/IO/Uncompress/Unzip.pm15
-rw-r--r--ext/IO-Compress/t/000prereq.t2
22 files changed, 214 insertions, 204 deletions
diff --git a/ext/Compress-Raw-Bzip2/Changes b/ext/Compress-Raw-Bzip2/Changes
index f5133dbedd..928bfcdf67 100644
--- a/ext/Compress-Raw-Bzip2/Changes
+++ b/ext/Compress-Raw-Bzip2/Changes
@@ -1,10 +1,12 @@
CHANGES
-------
- 2.017 26 February 2009
+ 2.017 28 March 2009
* Minor changes to allow building in perl core.
+ * Removed MAN3PODS from Makefile.PL
+
2.015 3 September 2008
* Documented bzlibversion
diff --git a/ext/Compress-Raw-Bzip2/Makefile.PL b/ext/Compress-Raw-Bzip2/Makefile.PL
index 192c28f8f9..ba65694c57 100644
--- a/ext/Compress-Raw-Bzip2/Makefile.PL
+++ b/ext/Compress-Raw-Bzip2/Makefile.PL
@@ -35,13 +35,6 @@ WriteMakefile(
},
(
- $ENV{SKIP_FOR_CORE}
- ? (MAN3PODS => {})
- : ()
- ),
-
-
- (
$BUILD_BZIP2
? bzip2_files($BZIP2_LIB)
: (LIBS => [ "-L$BZIP2_LIB -lbz2 " ])
@@ -54,6 +47,8 @@ WriteMakefile(
: ()
),
+ INSTALLDIRS => ($] > 5.010 ? 'perl' : 'site'),
+
((ExtUtils::MakeMaker->VERSION() gt '6.30') ?
('LICENSE' => 'perl') : ()),
diff --git a/ext/Compress-Raw-Bzip2/README b/ext/Compress-Raw-Bzip2/README
index d54c8596aa..559e5c148a 100644
--- a/ext/Compress-Raw-Bzip2/README
+++ b/ext/Compress-Raw-Bzip2/README
@@ -3,7 +3,7 @@
Version 2.017
- 28th February 2009
+ 28th March 2009
Copyright (c) 2005-2009 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it
diff --git a/ext/Compress-Raw-Bzip2/t/000prereq.t b/ext/Compress-Raw-Bzip2/t/000prereq.t
index 1467eeda7d..b8dddca5d6 100644
--- a/ext/Compress-Raw-Bzip2/t/000prereq.t
+++ b/ext/Compress-Raw-Bzip2/t/000prereq.t
@@ -19,7 +19,7 @@ BEGIN
if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
- my $VERSION = '2.016';
+ my $VERSION = '2.017';
my @NAMES = qw(
);
diff --git a/ext/Compress-Raw-Zlib/Changes b/ext/Compress-Raw-Zlib/Changes
index 02e68cc189..e8e989d7cf 100644
--- a/ext/Compress-Raw-Zlib/Changes
+++ b/ext/Compress-Raw-Zlib/Changes
@@ -1,10 +1,12 @@
CHANGES
-------
- 2.017 1 February 2009
+ 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()
diff --git a/ext/Compress-Raw-Zlib/Makefile.PL b/ext/Compress-Raw-Zlib/Makefile.PL
index 72a7b89a5a..d141df42a0 100644
--- a/ext/Compress-Raw-Zlib/Makefile.PL
+++ b/ext/Compress-Raw-Zlib/Makefile.PL
@@ -77,24 +77,11 @@ WriteMakefile(
},
(
- $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@cpan.org>')
- : ()
- ),
-
INSTALLDIRS => ($] >= 5.009 ? 'perl' : 'site'),
((ExtUtils::MakeMaker->VERSION() gt '6.30') ?
diff --git a/ext/Compress-Raw-Zlib/README b/ext/Compress-Raw-Zlib/README
index 1a35da425f..99ae85a0b3 100644
--- a/ext/Compress-Raw-Zlib/README
+++ b/ext/Compress-Raw-Zlib/README
@@ -3,7 +3,7 @@
Version 2.017
- 28th February 2009
+ 28th March 2009
Copyright (c) 2005-2009 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it
diff --git a/ext/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm b/ext/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm
index ee87bfa883..308a8782fd 100644
--- a/ext/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm
+++ b/ext/Compress-Raw-Zlib/lib/Compress/Raw/Zlib.pm
@@ -998,146 +998,13 @@ 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.
-See ?? for a discussion on why C<LimitOutput> is needed and how to use it.
-
If C<LimitOutput> is enabled, the C<ConsumeInput> option will also be
enabled.
-The input buffer may not have been fully processed, so the C<LimitOutput>
-option will enable C<ConsumeInput>
-
This option defaults to false.
-B<Why LimitOutput?>
-
-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 *
-
-C<inflate> will only terminate the loop if it returns a status that isn't
-C<Z_OK>, i.e. 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 all
-the uncompressed data has been written to the output buffer - the size of
-C<$output> is unbounded.
-
-If you need to cope with this use-case, C<LimitOutput> is for you.
-
-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. Below is a typical
-code
-
- 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 ;
-
-Points to note this time:
-
-=over 5
-
-=item *
-
-There are now two nested loops: the outer loop for reading the compressed
-data from STDIN; and the inner loop to repeatedly uncompress the C<$input>
-buffer.
-
-=item *
-
-There are two way the inner loop can be terminated
-
-=back
-
-If you know the underlying zlib interface, C<LimitOutput> will call the
-zlib C<inflate> function once
-
-Limiting the size of the output buffer means that there will be cases where
-C<$input> will not have been completely processed.
-
-See L</Examples> for an example of how to use C<LimitOutput>.
-
-it will return after a single call to the underlying
-zlib C<inflate> function.
-
-once the output buffer is full.
-
-As with the default it will also return if an error is encountered or the
-end of the compressed data stream is reached.
+See L</The LimitOutput option> for a discussion on why C<LimitOutput> is
+needed and how to use it.
=back
@@ -1288,8 +1155,7 @@ Here is an example of using C<inflate>.
{
$status = $x->inflate($input, $output) ;
- print $output
- if $status == Z_OK or $status == Z_STREAM_END ;
+ print $output ;
last if $status != Z_OK ;
}
@@ -1365,6 +1231,142 @@ These functions allow checksums to be merged.
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) ;
+
+ 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 ;
+
+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
diff --git a/ext/IO-Compress/Changes b/ext/IO-Compress/Changes
index f422d5b3da..8faec2a8c4 100644
--- a/ext/IO-Compress/Changes
+++ b/ext/IO-Compress/Changes
@@ -3,14 +3,18 @@ CHANGES
2.017 30 March 2009
- * TODO - mention LimitOutput
-
- * A few chenges to get the test harness to work on VMS courtesy of
- Craig. A. Berry.
-
* Merged IO-Compress-Base, IO-Compress-Bzip2, IO-Compress-Zlib &
Compress-Zlib into IO-Compress.
+ * The interface to Compress-Raw-Zlib now uses the new LimitOutput
+ feature. This will make all of the zlib-related IO-Compress modules
+ less greedy in their memory consumption.
+
+ * Removed MAN3PODS from Makefile.PL
+
+ * A few changes to get the test harness to work on VMS courtesy of
+ Craig. A. Berry.
+
* IO::Compress::Base & IO::Uncompress::Base
Downgraded some croaks in the constructors to just set $! (by letting
the code attempt to open a file and fail).
@@ -27,6 +31,10 @@ CHANGES
0xFFFFFFFF. Also the ZIP64 extra field was 4 bytes short.
Problem spotted by Dino Chiesa.
+ * IO::Uncompress::Unzip
+ - use POSIX::mktime instead of Time::Local::timelocal to convert
+ the zip DOS time field into Unix time.
+
* Compress::Zlib
- Documented Compress::Zlib::zlib_version()
diff --git a/ext/IO-Compress/Makefile.PL b/ext/IO-Compress/Makefile.PL
index b939d5924c..e11cf8f153 100644
--- a/ext/IO-Compress/Makefile.PL
+++ b/ext/IO-Compress/Makefile.PL
@@ -22,7 +22,7 @@ WriteMakefile(
(
$ENV{SKIP_FOR_CORE}
- ? (MAN3PODS => {})
+ ? ()
: (PREREQ_PM => { 'Compress::Raw::Bzip2' => $::VERSION,
'Compress::Raw::Zlib' => $::VERSION,
$] >= 5.005 && $] < 5.006
@@ -38,6 +38,14 @@ WriteMakefile(
: ()
),
+ INSTALLDIRS => ($] >= 5.009 ? 'perl' : 'site'),
+
+ (
+ $] >= 5.009 && ! $ENV{PERL_CORE}
+ ? (INST_LIB => 'blib/arch')
+ : ()
+ ),
+
((ExtUtils::MakeMaker->VERSION() gt '6.30') ?
('LICENSE' => 'perl') : ()),
diff --git a/ext/IO-Compress/README b/ext/IO-Compress/README
index 07ae661601..6f283b3ba1 100644
--- a/ext/IO-Compress/README
+++ b/ext/IO-Compress/README
@@ -3,7 +3,7 @@
Version 2.017
- 28th February 2009
+ 28th March 2009
Copyright (c) 1995-2009 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it
@@ -13,9 +13,18 @@ DESCRIPTION
-----------
This distribution provides a Perl interface to allow reading and writing of
-compressed data created with the zlib and bziip2 libraries.
+compressed data created with the zlib and bzip2 libraries.
-The distribiution also ocontain the Compress::Zlib modeule.
+IO-Compress supports reading and writing of bzip2, RFC 1950, RFC
+1951, RFC 1952 (i.e. gzip) and zip files/buffers.
+
+The following modules used to be distributed separately, but are now
+included with the IO-Compress distribution.
+
+ Compress-Zlib
+ IO-Compress-Zlib
+ IO-Compress-Bzip2
+ IO-Compress-Base
PREREQUISITES
-------------
diff --git a/ext/IO-Compress/examples/io/bzip2/bzcat b/ext/IO-Compress/examples/io/bzip2/bzcat
index 7d7464377a..81123200c5 100755
--- a/ext/IO-Compress/examples/io/bzip2/bzcat
+++ b/ext/IO-Compress/examples/io/bzip2/bzcat
@@ -2,7 +2,7 @@
use IO::Uncompress::Bunzip2 qw( $Bunzip2Error );
use strict ;
-local ($^W) = 1; #use warnings ;
+use warnings ;
#die "Usage: gzcat file...\n"
# unless @ARGV ;
diff --git a/ext/IO-Compress/examples/io/bzip2/bzgrep b/ext/IO-Compress/examples/io/bzip2/bzgrep
index 1ac162ca41..ceb4e8412b 100755
--- a/ext/IO-Compress/examples/io/bzip2/bzgrep
+++ b/ext/IO-Compress/examples/io/bzip2/bzgrep
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use strict ;
-local ($^W) = 1; #use warnings ;
+use warnings ;
use IO::Uncompress::Bunzip2 qw($Bunzip2Error);
die "Usage: gzgrep pattern [file...]\n"
diff --git a/ext/IO-Compress/examples/io/bzip2/bzstream b/ext/IO-Compress/examples/io/bzip2/bzstream
index 9bba3a5c4f..3e88d68258 100755
--- a/ext/IO-Compress/examples/io/bzip2/bzstream
+++ b/ext/IO-Compress/examples/io/bzip2/bzstream
@@ -1,7 +1,7 @@
#!/usr/local/bin/perl
use strict ;
-local ($^W) = 1; #use warnings ;
+use warnings ;
use IO::Compress::Bzip2 qw(:all);
bzip2 '-' => '-'
diff --git a/ext/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm b/ext/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm
index 7e6b0199b4..ca650c6038 100644
--- a/ext/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm
+++ b/ext/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm
@@ -4,13 +4,13 @@ use strict;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.016 qw(:Status);
+use IO::Compress::Base::Common 2.017 qw(:Status);
#use Compress::Bzip2 ;
-use Compress::Raw::Bzip2 2.016 ;
+use Compress::Raw::Bzip2 2.017 ;
our ($VERSION);
-$VERSION = '2.016';
+$VERSION = '2.017';
sub mkCompObject
{
diff --git a/ext/IO-Compress/lib/IO/Compress/Bzip2.pm b/ext/IO-Compress/lib/IO/Compress/Bzip2.pm
index 356ba1a2c4..144b9788ae 100644
--- a/ext/IO-Compress/lib/IO/Compress/Bzip2.pm
+++ b/ext/IO-Compress/lib/IO/Compress/Bzip2.pm
@@ -5,16 +5,16 @@ use warnings;
use bytes;
require Exporter ;
-use IO::Compress::Base 2.016 ;
+use IO::Compress::Base 2.017 ;
-use IO::Compress::Base::Common 2.016 qw(createSelfTiedObject);
-use IO::Compress::Adapter::Bzip2 2.016 ;
+use IO::Compress::Base::Common 2.017 qw(createSelfTiedObject);
+use IO::Compress::Adapter::Bzip2 2.017 ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bzip2Error);
-$VERSION = '2.016';
+$VERSION = '2.017';
$Bzip2Error = '';
@ISA = qw(Exporter IO::Compress::Base);
@@ -51,7 +51,7 @@ sub getExtraParams
{
my $self = shift ;
- use IO::Compress::Base::Common 2.016 qw(:Parse);
+ use IO::Compress::Base::Common 2.017 qw(:Parse);
return (
'BlockSize100K' => [0, 1, Parse_unsigned, 1],
diff --git a/ext/IO-Compress/lib/IO/Compress/Zip.pm b/ext/IO-Compress/lib/IO/Compress/Zip.pm
index 73b158a62e..35a968f19f 100644
--- a/ext/IO-Compress/lib/IO/Compress/Zip.pm
+++ b/ext/IO-Compress/lib/IO/Compress/Zip.pm
@@ -21,9 +21,9 @@ BEGIN
import IO::Compress::Bzip2 2.017 ;
} ;
# eval { require IO::Compress::Adapter::Lzma ;
-# import IO::Compress::Adapter::Lzma 2.016 ;
+# import IO::Compress::Adapter::Lzma 2.017 ;
# require IO::Compress::Lzma ;
-# import IO::Compress::Lzma 2.016 ;
+# import IO::Compress::Lzma 2.017 ;
# } ;
}
diff --git a/ext/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm b/ext/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm
index 680dbfc9eb..802afce581 100644
--- a/ext/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm
+++ b/ext/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm
@@ -4,13 +4,13 @@ use strict;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.016 qw(:Status);
+use IO::Compress::Base::Common 2.017 qw(:Status);
#use Compress::Bzip2 ;
-use Compress::Raw::Bzip2 2.016 ;
+use Compress::Raw::Bzip2 2.017 ;
our ($VERSION, @ISA);
-$VERSION = '2.016';
+$VERSION = '2.017';
#@ISA = qw( Compress::Raw::Bunzip2 );
diff --git a/ext/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm b/ext/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm
index e7b36c8702..088fd9de60 100644
--- a/ext/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm
+++ b/ext/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm
@@ -31,7 +31,7 @@ BEGIN
eval ' use IO::Uncompress::Adapter::Bunzip2 2.017 ;';
eval ' use IO::Uncompress::Adapter::LZO 2.017 ;';
eval ' use IO::Uncompress::Adapter::Lzf 2.017 ;';
- #eval ' use IO::Uncompress::Adapter::UnLzma 2.016 ;';
+ #eval ' use IO::Uncompress::Adapter::UnLzma 2.017 ;';
eval ' use IO::Uncompress::Bunzip2 2.017 ;';
eval ' use IO::Uncompress::UnLzop 2.017 ;';
@@ -40,7 +40,7 @@ BEGIN
eval ' use IO::Uncompress::RawInflate 2.017 ;';
eval ' use IO::Uncompress::Unzip 2.017 ;';
eval ' use IO::Uncompress::UnLzf 2.017 ;';
- #eval ' use IO::Uncompress::UnLzma 2.016 ;';
+ #eval ' use IO::Uncompress::UnLzma 2.017 ;';
}
sub new
diff --git a/ext/IO-Compress/lib/IO/Uncompress/Bunzip2.pm b/ext/IO-Compress/lib/IO/Uncompress/Bunzip2.pm
index 5fb1879e95..0162ad60bd 100644
--- a/ext/IO-Compress/lib/IO/Uncompress/Bunzip2.pm
+++ b/ext/IO-Compress/lib/IO/Uncompress/Bunzip2.pm
@@ -4,15 +4,15 @@ use strict ;
use warnings;
use bytes;
-use IO::Compress::Base::Common 2.016 qw(:Status createSelfTiedObject);
+use IO::Compress::Base::Common 2.017 qw(:Status createSelfTiedObject);
-use IO::Uncompress::Base 2.016 ;
-use IO::Uncompress::Adapter::Bunzip2 2.016 ;
+use IO::Uncompress::Base 2.017 ;
+use IO::Uncompress::Adapter::Bunzip2 2.017 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bunzip2Error);
-$VERSION = '2.016';
+$VERSION = '2.017';
$Bunzip2Error = '';
@ISA = qw( Exporter IO::Uncompress::Base );
@@ -40,7 +40,7 @@ sub getExtraParams
{
my $self = shift ;
- use IO::Compress::Base::Common 2.016 qw(:Parse);
+ use IO::Compress::Base::Common 2.017 qw(:Parse);
return (
'Verbosity' => [1, 1, Parse_boolean, 0],
diff --git a/ext/IO-Compress/lib/IO/Uncompress/Unzip.pm b/ext/IO-Compress/lib/IO/Uncompress/Unzip.pm
index 08f94db6bc..45ef3b59c4 100644
--- a/ext/IO-Compress/lib/IO/Uncompress/Unzip.pm
+++ b/ext/IO-Compress/lib/IO/Uncompress/Unzip.pm
@@ -702,12 +702,9 @@ sub filterUncompressed
}
-# from Archive::Zip
+# from Archive::Zip & info-zip
sub _dosToUnixTime
{
- #use Time::Local 'timelocal_nocheck';
- use Time::Local 'timelocal';
-
my $dt = shift;
my $year = ( ( $dt >> 25 ) & 0x7f ) + 80;
@@ -718,11 +715,11 @@ sub _dosToUnixTime
my $min = ( ( $dt >> 5 ) & 0x3f );
my $sec = ( ( $dt << 1 ) & 0x3e );
- # catch errors
- my $time_t =
- eval { timelocal( $sec, $min, $hour, $mday, $mon, $year ); };
- return 0
- if $@;
+
+ use POSIX 'mktime';
+
+ my $time_t = mktime( $sec, $min, $hour, $mday, $mon, $year, 0, 0, -1 );
+ return 0 if ! defined $time_t;
return $time_t;
}
diff --git a/ext/IO-Compress/t/000prereq.t b/ext/IO-Compress/t/000prereq.t
index 3ac318fe56..c56e7bd640 100644
--- a/ext/IO-Compress/t/000prereq.t
+++ b/ext/IO-Compress/t/000prereq.t
@@ -19,7 +19,7 @@ BEGIN
if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
- my $VERSION = '2.016';
+ my $VERSION = '2.017';
my @NAMES = qw(
Compress::Raw::Bzip2
Compress::Raw::Zlib