diff options
author | Norbert Preining <norbert@preining.info> | 2020-04-11 03:09:12 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-04-11 03:09:12 +0000 |
commit | c2697fc286a1e2c94fd9968b76be6f4a6d2114cd (patch) | |
tree | 1dc2cfb07cb032740483dd8be7c74aff66b70352 /systems/texlive/tlnet/tlpkg/tlperl/lib/IO | |
parent | 25111608e6aa05042b0c6f83009262e1973d7a45 (diff) |
CTAN sync 202004110309
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/lib/IO')
36 files changed, 853 insertions, 860 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Adapter/Bzip2.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Adapter/Bzip2.pm index 99773e8160..623a2c671a 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Adapter/Bzip2.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Adapter/Bzip2.pm @@ -4,12 +4,12 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.074 qw(:Status); +use IO::Compress::Base::Common 2.084 qw(:Status); -use Compress::Raw::Bzip2 2.074 ; +use Compress::Raw::Bzip2 2.084 ; our ($VERSION); -$VERSION = '2.074'; +$VERSION = '2.084'; sub mkCompObject { diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Adapter/Deflate.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Adapter/Deflate.pm index 1edd3fa62a..8903287b10 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Adapter/Deflate.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Adapter/Deflate.pm @@ -4,13 +4,13 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.074 qw(:Status); -use Compress::Raw::Zlib 2.074 qw( !crc32 !adler32 ) ; +use IO::Compress::Base::Common 2.084 qw(:Status); +use Compress::Raw::Zlib 2.084 qw( !crc32 !adler32 ) ; require Exporter; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, @EXPORT, %DEFLATE_CONSTANTS); -$VERSION = '2.074'; +$VERSION = '2.084'; @ISA = qw(Exporter); @EXPORT_OK = @Compress::Raw::Zlib::DEFLATE_CONSTANTS; %EXPORT_TAGS = %Compress::Raw::Zlib::DEFLATE_CONSTANTS; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Adapter/Identity.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Adapter/Identity.pm index 71dee011ff..ae23102a24 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Adapter/Identity.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Adapter/Identity.pm @@ -4,10 +4,10 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.074 qw(:Status); +use IO::Compress::Base::Common 2.084 qw(:Status); our ($VERSION); -$VERSION = '2.074'; +$VERSION = '2.084'; sub mkCompObject { diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Base.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Base.pm index 74eac6fba6..1e2a54ba39 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Base.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Base.pm @@ -6,7 +6,7 @@ require 5.006 ; use strict ; use warnings; -use IO::Compress::Base::Common 2.074 ; +use IO::Compress::Base::Common 2.084 ; use IO::File (); ; use Scalar::Util (); @@ -20,7 +20,7 @@ use Symbol(); our (@ISA, $VERSION); @ISA = qw(IO::File Exporter); -$VERSION = '2.074'; +$VERSION = '2.084'; #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. @@ -90,7 +90,7 @@ sub writeAt if (defined *$self->{FH}) { my $here = tell(*$self->{FH}); - return $self->saveErrorString(undef, "Cannot seek to end of output filehandle: $!", $!) + return $self->saveErrorString(undef, "Cannot seek to end of output filehandle: $!", $!) if $here < 0 ; seek(*$self->{FH}, $offset, IO::Handle::SEEK_SET) or return $self->saveErrorString(undef, "Cannot seek to end of output filehandle: $!", $!) ; @@ -120,7 +120,7 @@ sub output my $data = shift ; my $last = shift ; - return 1 + return 1 if length $data == 0 && ! $last ; if ( *$self->{FilterContainer} ) { @@ -131,7 +131,7 @@ sub output if (length $data) { if ( defined *$self->{FH} ) { defined *$self->{FH}->write( $data, length $data ) - or return $self->saveErrorString(0, $!, $!); + or return $self->saveErrorString(0, $!, $!); } else { ${ *$self->{Buffer} } .= $data ; @@ -157,7 +157,7 @@ our %PARAMS = ( 'filtercontainer' => [IO::Compress::Base::Common::Parse_code, undef], ); - + sub checkParams { my $self = shift ; @@ -171,9 +171,9 @@ sub checkParams $self->getExtraParams(), - *$self->{OneShot} ? $self->getOneShotParams() + *$self->{OneShot} ? $self->getOneShotParams() : (), - }, + }, @_) or $self->croakError("${class}: " . $got->getError()) ; return $got ; @@ -237,15 +237,15 @@ sub _create $obj->ckParams($got) or $obj->croakError("${class}: " . $obj->error()); - if ($got->getValue('encode')) { + if ($got->getValue('encode')) { my $want_encoding = $got->getValue('encode'); *$obj->{Encoding} = IO::Compress::Base::Common::getEncoding($obj, $class, $want_encoding); - my $x = *$obj->{Encoding}; + my $x = *$obj->{Encoding}; } else { - *$obj->{Encoding} = undef; + *$obj->{Encoding} = undef; } - + $obj->saveStatus(STATUS_OK) ; my $status ; @@ -253,7 +253,7 @@ sub _create { *$obj->{Compress} = $obj->mkComp($got) or return undef; - + *$obj->{UnCompSize} = new U64 ; *$obj->{CompSize} = new U64 ; @@ -274,14 +274,14 @@ sub _create } } - elsif ($outType eq 'filename') { + elsif ($outType eq 'filename') { no warnings; my $mode = '>' ; $mode = '>>' if $appendOutput; - *$obj->{FH} = new IO::File "$mode $outValue" + *$obj->{FH} = new IO::File "$mode $outValue" or return $obj->saveErrorString(undef, "cannot open file '$outValue': $!", $!) ; - *$obj->{StdIO} = ($outValue eq '-'); + *$obj->{StdIO} = ($outValue eq '-'); setBinModeOutput(*$obj->{FH}) ; } } @@ -307,7 +307,7 @@ sub _create return $obj ; } -sub ckOutputParam +sub ckOutputParam { my $self = shift ; my $from = shift ; @@ -321,15 +321,15 @@ sub ckOutputParam $self->croakError("$from: output buffer is read-only") if $outType eq 'buffer' && Scalar::Util::readonly(${ $_[0] }); - - return 1; + + return 1; } sub _def { my $obj = shift ; - + my $class= (caller)[0] ; my $name = (caller(1))[3] ; @@ -356,7 +356,7 @@ sub _def # { # while (my($k, $v) = each %$input) # { -# $v = \$input->{$k} +# $v = \$input->{$k} # unless defined $v ; # # $obj->_singleTarget($x, 1, $k, $v, @_) @@ -381,11 +381,11 @@ sub _def if (! $x->{oneOutput} ) { - my $inFile = ($x->{inType} eq 'filenames' + my $inFile = ($x->{inType} eq 'filenames' || $x->{inType} eq 'filename'); $x->{inType} = $inFile ? 'filename' : 'buffer'; - + foreach my $in ($x->{oneInput} ? $input : @$input) { my $out ; @@ -416,7 +416,7 @@ sub _singleTarget my $x = shift ; my $inputIsFilename = shift; my $input = shift; - + if ($x->{oneInput}) { $obj->getFileInfo($x->{Got}, $input) @@ -426,7 +426,7 @@ sub _singleTarget or return undef ; - defined $z->_wr2($input, $inputIsFilename) + defined $z->_wr2($input, $inputIsFilename) or return $z->closeError(undef) ; return $z->close() ; @@ -456,7 +456,7 @@ sub _singleTarget or return undef ; } - defined $obj->_wr2($element, $isFilename) + defined $obj->_wr2($element, $isFilename) or return $obj->closeError(undef) ; *$obj->{Got} = $keep->clone(); @@ -476,7 +476,7 @@ sub _wr2 my $input = $source ; if (! $inputIsFilename) { - $input = \$source + $input = \$source if ! ref $source; } @@ -496,23 +496,23 @@ sub _wr2 $fh = new IO::File "<$input" or return $self->saveErrorString(undef, "cannot open file '$input': $!", $!) ; } - binmode $fh if *$self->{Got}->valueOrDefault('binmodein') ; + binmode $fh ; my $status ; my $buff ; my $count = 0 ; while ($status = read($fh, $buff, 16 * 1024)) { $count += length $buff; - defined $self->syswrite($buff, @_) + defined $self->syswrite($buff, @_) or return undef ; } - return $self->saveErrorString(undef, $!, $!) + return $self->saveErrorString(undef, $!, $!) if ! defined $status ; if ( (!$isFilehandle || *$self->{AutoClose}) && $input ne '-') - { - $fh->close() + { + $fh->close() or return undef ; } @@ -555,7 +555,7 @@ sub TIEHANDLE return $_[0] if ref($_[0]); die "OOPS\n" ; } - + sub UNTIE { my $self = shift ; @@ -565,10 +565,10 @@ sub DESTROY { my $self = shift ; local ($., $@, $!, $^E, $?); - + $self->close() ; - # TODO - memory leak with 5.8.0 - this isn't called until + # TODO - memory leak with 5.8.0 - this isn't called until # global destruction # %{ *$self } = () ; @@ -603,7 +603,7 @@ sub syswrite if (@_ > 2) { $offset = $_[2] || 0; - $self->croakError(*$self->{ClassName} . "::write: offset outside string") + $self->croakError(*$self->{ClassName} . "::write: offset outside string") if $offset > $slen; if ($offset < 0) { $offset += $slen; @@ -617,20 +617,20 @@ sub syswrite } return 0 if (! defined $$buffer || length $$buffer == 0) && ! *$self->{FlushPending}; - + # *$self->{Pending} .= $$buffer ; -# +# # return length $$buffer # if (length *$self->{Pending} < 1024 * 16 && ! *$self->{FlushPending}) ; # -# $$buffer = *$self->{Pending} ; +# $$buffer = *$self->{Pending} ; # *$self->{Pending} = ''; - - if (*$self->{Encoding}) { + + if (*$self->{Encoding}) { $$buffer = *$self->{Encoding}->encode($$buffer); } else { - $] >= 5.008 and ( utf8::downgrade($$buffer, 1) + $] >= 5.008 and ( utf8::downgrade($$buffer, 1) or Carp::croak "Wide character in " . *$self->{ClassName} . "::write:"); } @@ -642,7 +642,7 @@ sub syswrite my $outBuffer=''; my $status = *$self->{Compress}->compr($buffer, $outBuffer) ; - return $self->saveErrorString(undef, *$self->{Compress}{Error}, + return $self->saveErrorString(undef, *$self->{Compress}{Error}, *$self->{Compress}{ErrorNo}) if $status == STATUS_ERROR; @@ -690,7 +690,7 @@ sub _flushCompressed my $outBuffer=''; my $status = *$self->{Compress}->flush($outBuffer, @_) ; - return $self->saveErrorString(0, *$self->{Compress}{Error}, + return $self->saveErrorString(0, *$self->{Compress}{Error}, *$self->{Compress}{ErrorNo}) if $status == STATUS_ERROR; @@ -702,19 +702,19 @@ sub _flushCompressed $self->outputPayload($outBuffer) or return 0; - return 1; + return 1; } sub flush -{ +{ my $self = shift ; $self->_flushCompressed(@_) - or return 0; + or return 0; if ( defined *$self->{FH} ) { defined *$self->{FH}->flush() - or return $self->saveErrorString(0, $!, $!); + or return $self->saveErrorString(0, $!, $!); } return 1; @@ -737,21 +737,21 @@ sub _newStream $self->ckParams($got) or $self->croakError("newStream: $self->{Error}"); - if ($got->getValue('encode')) { + if ($got->getValue('encode')) { my $want_encoding = $got->getValue('encode'); *$self->{Encoding} = IO::Compress::Base::Common::getEncoding($self, $class, $want_encoding); } else { *$self->{Encoding} = undef; } - + *$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(); @@ -763,9 +763,9 @@ sub _newStream sub newStream { my $self = shift ; - + my $got = $self->checkParams('newStream', *$self->{Got}, @_) - or return 0 ; + or return 0 ; $self->_newStream($got); @@ -775,7 +775,7 @@ sub newStream # *$self->{Header} = $self->mkHeader($got) ; # $self->output(*$self->{Header} ) # or return 0; -# +# # *$self->{UnCompSize}->reset(); # *$self->{CompSize}->reset(); # @@ -797,6 +797,7 @@ sub _writeTrailer my $trailer = ''; my $status = *$self->{Compress}->close($trailer) ; + return $self->saveErrorString(0, *$self->{Compress}{Error}, *$self->{Compress}{ErrorNo}) if $status == STATUS_ERROR; @@ -805,7 +806,6 @@ sub _writeTrailer $trailer .= $self->mkTrailer(); defined $trailer or return 0; - return $self->output($trailer); } @@ -822,7 +822,7 @@ sub close return 1 if *$self->{Closed} || ! *$self->{Compress} ; *$self->{Closed} = 1 ; - untie *$self + untie *$self if $] >= 5.008 ; *$self->{FlushPending} = 1 ; @@ -840,7 +840,7 @@ sub close if ((! *$self->{Handle} || *$self->{AutoClose}) && ! *$self->{StdIO}) { $! = 0 ; *$self->{FH}->close() - or return $self->saveErrorString(0, $!, $!); + or return $self->saveErrorString(0, $!, $!); } delete *$self->{FH} ; # This delete can set $! in older Perls, so reset the errno @@ -924,7 +924,7 @@ sub seek } # short circuit if seeking to current offset - return 1 if $target == $here ; + return 1 if $target == $here ; # Outlaw any attempt to seek backwards $self->croakError(*$self->{ClassName} . "::seek: cannot seek backwards") @@ -944,16 +944,16 @@ sub binmode { 1; # my $self = shift ; -# return defined *$self->{FH} -# ? binmode *$self->{FH} +# return defined *$self->{FH} +# ? binmode *$self->{FH} # : 1 ; } sub fileno { my $self = shift ; - return defined *$self->{FH} - ? *$self->{FH}->fileno() + return defined *$self->{FH} + ? *$self->{FH}->fileno() : undef ; } @@ -966,8 +966,8 @@ sub opened sub autoflush { my $self = shift ; - return defined *$self->{FH} - ? *$self->{FH}->autoflush(@_) + return defined *$self->{FH} + ? *$self->{FH}->autoflush(@_) : undef ; } @@ -995,7 +995,7 @@ sub _notAvailable *PRINTF = \&printf; *WRITE = \&syswrite; *write = \&syswrite; -*SEEK = \&seek; +*SEEK = \&seek; *TELL = \&tell; *EOF = \&eof; *CLOSE = \&close; @@ -1004,13 +1004,13 @@ sub _notAvailable #*sysread = \&_notAvailable; #*syswrite = \&_write; -1; +1; __END__ =head1 NAME -IO::Compress::Base - Base Class for IO::Compress modules +IO::Compress::Base - Base Class for IO::Compress modules =head1 SYNOPSIS @@ -1023,7 +1023,7 @@ purpose is to be sub-classed by IO::Compress modules. =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> +L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -1033,7 +1033,7 @@ L<IO::Zlib|IO::Zlib> =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -1041,7 +1041,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Base/Common.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Base/Common.pm index c82c99a441..53232898c4 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Base/Common.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Base/Common.pm @@ -11,15 +11,15 @@ use File::GlobMapper; require Exporter; our ($VERSION, @ISA, @EXPORT, %EXPORT_TAGS, $HAS_ENCODE); @ISA = qw(Exporter); -$VERSION = '2.074'; +$VERSION = '2.084'; @EXPORT = qw( isaFilehandle isaFilename isaScalar - whatIsInput whatIsOutput + whatIsInput whatIsOutput isaFileGlobString cleanFileGlobString oneTarget setBinModeInput setBinModeOutput - ckInOutParams + ckInOutParams createSelfTiedObject - + isGeMax32 MAX32 @@ -33,7 +33,7 @@ $VERSION = '2.074'; STATUS_ENDSTREAM STATUS_EOF STATUS_ERROR - ); + ); %EXPORT_TAGS = ( Status => [qw( STATUS_OK STATUS_ENDSTREAM @@ -41,15 +41,15 @@ $VERSION = '2.074'; STATUS_ERROR )]); - + use constant STATUS_OK => 0; use constant STATUS_ENDSTREAM => 1; use constant STATUS_EOF => 2; use constant STATUS_ERROR => -1; -use constant MAX16 => 0xFFFF ; -use constant MAX32 => 0xFFFFFFFF ; -use constant MAX32cmp => 0xFFFFFFFF + 1 - 1; # for 5.6.x on 32-bit need to force an non-IV value - +use constant MAX16 => 0xFFFF ; +use constant MAX32 => 0xFFFFFFFF ; +use constant MAX32cmp => 0xFFFFFFFF + 1 - 1; # for 5.6.x on 32-bit need to force an non-IV value + sub isGeMax32 { @@ -89,7 +89,7 @@ sub getEncoding($$$) } our ($needBinmode); -$needBinmode = ($^O eq 'MSWin32' || +$needBinmode = ($^O eq 'MSWin32' || ($] >= 5.006 && eval ' ${^UNICODE} || ${^UTF8LOCALE} ')) ? 1 : 1 ; @@ -97,7 +97,7 @@ sub setBinModeInput($) { my $handle = shift ; - binmode $handle + binmode $handle if $needBinmode; } @@ -112,10 +112,10 @@ sub setBinModeOutput($) sub isaFilehandle($) { use utf8; # Pragma needed to keep Perl 5.6.0 happy - return (defined $_[0] and - (UNIVERSAL::isa($_[0],'GLOB') or + return (defined $_[0] and + (UNIVERSAL::isa($_[0],'GLOB') or UNIVERSAL::isa($_[0],'IO::Handle') or - UNIVERSAL::isa(\$_[0],'GLOB')) + UNIVERSAL::isa(\$_[0],'GLOB')) ) } @@ -126,8 +126,8 @@ sub isaScalar sub isaFilename($) { - return (defined $_[0] and - ! ref $_[0] and + return (defined $_[0] and + ! ref $_[0] and UNIVERSAL::isa(\$_[0], 'SCALAR')); } @@ -154,7 +154,7 @@ use constant WANT_HASH => 0 ; sub whatIsInput($;$) { my $got = whatIs(@_); - + if (defined $got && $got eq 'filename' && defined $_[0] && $_[0] eq '-') { #use IO::File; @@ -169,14 +169,14 @@ sub whatIsInput($;$) sub whatIsOutput($;$) { my $got = whatIs(@_); - + if (defined $got && $got eq 'filename' && defined $_[0] && $_[0] eq '-') { $got = 'handle'; $_[0] = *STDOUT; #$_[0] = new IO::File(">-"); } - + return $got; } @@ -218,9 +218,9 @@ sub IO::Compress::Base::Validator::new my $error_ref = shift ; my $reportClass = shift ; - my %data = (Class => $Class, + my %data = (Class => $Class, Error => $error_ref, - reportClass => $reportClass, + reportClass => $reportClass, ) ; my $obj = bless \%data, $class ; @@ -237,7 +237,7 @@ sub IO::Compress::Base::Validator::new { $obj->croakError("$reportClass: illegal input parameter") ; #return undef ; - } + } # if ($inType eq 'hash') # { @@ -250,18 +250,18 @@ sub IO::Compress::Base::Validator::new { $obj->croakError("$reportClass: illegal output parameter") ; #return undef ; - } + } if ($inType ne 'fileglob' && $outType eq 'fileglob') { $obj->croakError("Need input fileglob for outout fileglob"); - } + } # if ($inType ne 'fileglob' && $outType eq 'hash' && $inType ne 'filename' ) # { # $obj->croakError("input must ne filename or fileglob when output is a hash"); -# } +# } if ($inType eq 'fileglob' && $outType eq 'fileglob') { @@ -276,7 +276,7 @@ sub IO::Compress::Base::Validator::new return $obj; } - + $obj->croakError("$reportClass: input and output $inType are identical") if $inType eq $outType && $_[0] eq $_[1] && $_[0] ne '-' ; @@ -334,7 +334,7 @@ sub IO::Compress::Base::Validator::new } } } - + return $obj ; } @@ -343,7 +343,7 @@ sub IO::Compress::Base::Validator::saveErrorString my $self = shift ; ${ $self->{Error} } = shift ; return undef; - + } sub IO::Compress::Base::Validator::croakError @@ -392,16 +392,16 @@ sub IO::Compress::Base::Validator::validateInputArray if ( @{ $_[0] } == 0 ) { return $self->saveErrorString("empty array reference") ; - } + } foreach my $element ( @{ $_[0] } ) { my $inType = whatIsInput($element); - + if (! $inType) { $self->croakError("unknown input parameter") ; - } + } elsif($inType eq 'filename') { $self->validateInputFilenames($element) @@ -429,13 +429,13 @@ sub IO::Compress::Base::Validator::validateInputArray # if ($ktype ne 'filename') # { # return $self->saveErrorString("hash key not filename") ; -# } +# } # # my %valid = map { $_ => 1 } qw(filename buffer array undef handle) ; # if (! $valid{$vtype}) # { # return $self->saveErrorString("hash value not ok") ; -# } +# } # } # # return $self ; @@ -467,13 +467,13 @@ sub createSelfTiedObject #$VERSION = '2.000_08'; #@ISA = qw(Exporter); -$EXPORT_TAGS{Parse} = [qw( ParseParameters - Parse_any Parse_unsigned Parse_signed +$EXPORT_TAGS{Parse} = [qw( ParseParameters + Parse_any Parse_unsigned Parse_signed Parse_boolean Parse_string Parse_code Parse_writable_scalar ) - ]; + ]; push @EXPORT, @{ $EXPORT_TAGS{Parse} } ; @@ -501,15 +501,15 @@ use constant IxGot => 1 ; sub ParseParameters { - my $level = shift || 0 ; + my $level = shift || 0 ; my $sub = (caller($level + 1))[3] ; local $Carp::CarpLevel = 1 ; - + return $_[1] if @_ == 2 && defined $_[1] && UNIVERSAL::isa($_[1], "IO::Compress::Base::Parameters"); - - my $p = new IO::Compress::Base::Parameters() ; + + my $p = new IO::Compress::Base::Parameters() ; $p->parse(@_) or croak "$sub: $p->[IxError]" ; @@ -527,7 +527,7 @@ sub Init { my $default = shift ; my %got ; - + my $obj = IO::Compress::Base::Parameters::new(); while (my ($key, $v) = each %$default) { @@ -538,7 +538,7 @@ sub Init # my ($first_only, $sticky, $type, $value) = @$v ; my $sticky = 0; my $x ; - $obj->_checkType($key, \$value, $type, 0, \$x) + $obj->_checkType($key, \$value, $type, 0, \$x) or return undef ; $key = lc $key; @@ -548,12 +548,12 @@ sub Init # if $type & Parse_multiple; # $got{$key} = [0, $type, $value, $x, $first_only, $sticky] ; - $got{$key} = [0, $type, $value, $x] ; + $got{$key} = [0, $type, $value, $x] ; # } # # $got{$key}[OFF_PARSED] = 0 ; } - + return bless \%got, "IO::Compress::Base::Parameters::Defaults" ; } @@ -563,7 +563,7 @@ sub IO::Compress::Base::Parameters::new my $obj; $obj->[IxError] = ''; - $obj->[IxGot] = {} ; + $obj->[IxGot] = {} ; return bless $obj, 'IO::Compress::Base::Parameters' ; } @@ -578,13 +578,13 @@ sub IO::Compress::Base::Parameters::setError $self->[IxError] = $error ; return $retval; } - + sub IO::Compress::Base::Parameters::getError { my $self = shift ; return $self->[IxError] ; } - + sub IO::Compress::Base::Parameters::parse { my $self = shift ; @@ -603,21 +603,21 @@ sub IO::Compress::Base::Parameters::parse } elsif (@_ == 1) { my $href = $_[0] ; - + return $self->setError("Expected even number of parameters, got 1") if ! defined $href or ! ref $href or ref $href ne "HASH" ; - + foreach my $key (keys %$href) { push @entered, $key ; push @entered, \$href->{$key} ; } } else { - + my $count = @_; return $self->setError("Expected even number of parameters, got $count") if $count % 2 != 0 ; - + for my $i (0.. $count / 2 - 1) { push @entered, $_[2 * $i] ; push @entered, \$_[2 * $i + 1] ; @@ -626,22 +626,22 @@ sub IO::Compress::Base::Parameters::parse foreach my $key (keys %$default) { - + my ($type, $value) = @{ $default->{$key} } ; - - if ($firstTime) { - $got->{$key} = [0, $type, $value, $value] ; + + if ($firstTime) { + $got->{$key} = [0, $type, $value, $value] ; } else { - $got->{$key}[OFF_PARSED] = 0 ; - } + $got->{$key}[OFF_PARSED] = 0 ; + } } my %parsed = (); - - + + for my $i (0.. @entered / 2 - 1) { my $key = $entered[2* $i] ; my $value = $entered[2* $i+1] ; @@ -651,15 +651,15 @@ sub IO::Compress::Base::Parameters::parse $key =~ s/^-// ; my $canonkey = lc $key; - - if ($got->{$canonkey}) + + if ($got->{$canonkey}) { my $type = $got->{$canonkey}[OFF_TYPE] ; my $parsed = $parsed{$canonkey}; ++ $parsed{$canonkey}; - return $self->setError("Muliple instances of '$key' found") - if $parsed ; + return $self->setError("Muliple instances of '$key' found") + if $parsed ; my $s ; $self->_checkType($key, $value, $type, 1, \$s) @@ -672,7 +672,7 @@ sub IO::Compress::Base::Parameters::parse else { push (@Bad, $key) } } - + if (@Bad) { my ($bad) = join(", ", @Bad) ; return $self->setError("unknown key value(s) $bad") ; @@ -699,14 +699,14 @@ sub IO::Compress::Base::Parameters::_checkType return $self->setError("Parameter '$key' not writable") if readonly $$value ; - if (ref $$value) + if (ref $$value) { return $self->setError("Parameter '$key' not a scalar reference") if ref $$value ne 'SCALAR' ; $$output = $$value ; } - else + else { return $self->setError("Parameter '$key' not a scalar") if ref $value ne 'SCALAR' ; @@ -727,13 +727,13 @@ sub IO::Compress::Base::Parameters::_checkType } elsif ($type & Parse_unsigned) { - + return $self->setError("Parameter '$key' must be an unsigned int, got 'undef'") if ! defined $value ; return $self->setError("Parameter '$key' must be an unsigned int, got '$value'") if $value !~ /^\d+$/; - - $$output = defined $value ? $value : 0 ; + + $$output = defined $value ? $value : 0 ; return 1; } elsif ($type & Parse_signed) @@ -743,7 +743,7 @@ sub IO::Compress::Base::Parameters::_checkType return $self->setError("Parameter '$key' must be a signed int, got '$value'") if $value !~ /^-?\d+$/; - $$output = defined $value ? $value : 0 ; + $$output = defined $value ? $value : 0 ; return 1 ; } elsif ($type & Parse_boolean) @@ -751,13 +751,13 @@ sub IO::Compress::Base::Parameters::_checkType return $self->setError("Parameter '$key' must be an int, got '$value'") if defined $value && $value !~ /^\d*$/; - $$output = defined $value && $value != 0 ? 1 : 0 ; + $$output = defined $value && $value != 0 ? 1 : 0 ; return 1; } elsif ($type & Parse_string) { - $$output = defined $value ? $value : "" ; + $$output = defined $value ? $value : "" ; return 1; } elsif ($type & Parse_code) @@ -765,10 +765,10 @@ sub IO::Compress::Base::Parameters::_checkType return $self->setError("Parameter '$key' must be a code reference, got '$value'") if (! defined $value || ref $value ne 'CODE') ; - $$output = defined $value ? $value : "" ; + $$output = defined $value ? $value : "" ; return 1; } - + $$output = $value ; return 1; } @@ -787,7 +787,7 @@ sub IO::Compress::Base::Parameters::setValue { $_[0]->[IxGot]{$_[1]}[OFF_PARSED] = 1; $_[0]->[IxGot]{$_[1]}[OFF_DEFAULT] = $_[2] ; - $_[0]->[IxGot]{$_[1]}[OFF_FIXED] = $_[2] ; + $_[0]->[IxGot]{$_[1]}[OFF_FIXED] = $_[2] ; } sub IO::Compress::Base::Parameters::valueRef @@ -802,7 +802,7 @@ sub IO::Compress::Base::Parameters::valueOrDefault my $default = shift ; my $value = $self->[IxGot]{$name}[OFF_DEFAULT] ; - + return $value if defined $value ; return $default ; } @@ -841,12 +841,12 @@ sub new { return bless [ 0, 0 ], $_[0] if @_ == 1 ; - + return bless [ $_[1], 0 ], $_[0] if @_ == 2 ; - - return bless [ $_[2], $_[1] ], $_[0] - if @_ == 3 ; + + return bless [ $_[2], $_[1] ], $_[0] + if @_ == 3 ; } sub newUnpack_V64 @@ -870,7 +870,7 @@ sub reset sub clone { - bless [ @{$_[0]} ], ref $_[0] ; + bless [ @{$_[0]} ], ref $_[0] ; } sub getHigh @@ -904,13 +904,13 @@ sub add $_[0]->[HIGH] += $value->[HIGH] ; $value = $value->[LOW]; } - elsif ($value > MAX32) { + elsif ($value > MAX32) { $_[0]->[HIGH] += int($value / HI_1) ; $value = $value % HI_1; } - + my $available = MAX32 - $_[0]->[LOW] ; - + if ($value > $available) { ++ $_[0]->[HIGH] ; $_[0]->[LOW] = $value - $available - 1; @@ -925,13 +925,13 @@ sub add32 # my $self = shift; my $value = $_[1]; - if ($value > MAX32) { + if ($value > MAX32) { $_[0]->[HIGH] += int($value / HI_1) ; $value = $value % HI_1; } - + my $available = MAX32 - $_[0]->[LOW] ; - + if ($value > $available) { ++ $_[0]->[HIGH] ; $_[0]->[LOW] = $value - $available - 1; @@ -977,6 +977,14 @@ sub equal $self->[HIGH] == $other->[HIGH] ; } +sub isZero +{ + my $self = shift; + + return $self->[LOW] == 0 && + $self->[HIGH] == 0 ; +} + sub gt { my $self = shift; @@ -997,7 +1005,7 @@ sub cmp return $self->[LOW] - $other->[LOW] ; } } - + sub is64bit { @@ -1025,7 +1033,7 @@ sub pack_V64 } -sub full32 +sub full32 { return $_[0] == MAX32 ; } diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Bzip2.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Bzip2.pm index 5fa5f584d2..1c0d027abd 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Bzip2.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Bzip2.pm @@ -5,16 +5,16 @@ use warnings; use bytes; require Exporter ; -use IO::Compress::Base 2.074 ; +use IO::Compress::Base 2.084 ; -use IO::Compress::Base::Common 2.074 qw(); -use IO::Compress::Adapter::Bzip2 2.074 ; +use IO::Compress::Base::Common 2.084 qw(); +use IO::Compress::Adapter::Bzip2 2.084 ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bzip2Error); -$VERSION = '2.074'; +$VERSION = '2.084'; $Bzip2Error = ''; @ISA = qw(IO::Compress::Base Exporter); @@ -51,7 +51,7 @@ sub getExtraParams { my $self = shift ; - use IO::Compress::Base::Common 2.074 qw(:Parse); + use IO::Compress::Base::Common 2.084 qw(:Parse); return ( 'blocksize100k' => [IO::Compress::Base::Common::Parse_unsigned, 1], @@ -143,14 +143,12 @@ __END__ =head1 NAME IO::Compress::Bzip2 - Write bzip2 files/buffers - - =head1 SYNOPSIS use IO::Compress::Bzip2 qw(bzip2 $Bzip2Error) ; - my $status = bzip2 $input => $output [,OPTS] + my $status = bzip2 $input => $output [,OPTS] or die "bzip2 failed: $Bzip2Error\n"; my $z = new IO::Compress::Bzip2 $output [,OPTS] @@ -170,7 +168,7 @@ IO::Compress::Bzip2 - Write bzip2 files/buffers $z->autoflush(); $z->input_line_number(); $z->newStream( [OPTS] ); - + $z->close() ; $Bzip2Error ; @@ -185,14 +183,14 @@ IO::Compress::Bzip2 - Write bzip2 files/buffers binmode $z fileno $z close $z ; - + =head1 DESCRIPTION -This module provides a Perl interface that allows writing bzip2 +This module provides a Perl interface that allows writing bzip2 compressed data to files or buffer. -For reading bzip2 files/buffers, see the companion module +For reading bzip2 files/buffers, see the companion module L<IO::Uncompress::Bunzip2|IO::Uncompress::Bunzip2>. =head1 Functional Interface @@ -204,7 +202,7 @@ section. use IO::Compress::Bzip2 qw(bzip2 $Bzip2Error) ; - bzip2 $input_filename_or_reference => $output_filename_or_reference [,OPTS] + bzip2 $input_filename_or_reference => $output_filename_or_reference [,OPTS] or die "bzip2 failed: $Bzip2Error\n"; The functional interface needs Perl5.005 or better. @@ -217,7 +215,7 @@ C<$input_filename_or_reference> and C<$output_filename_or_reference>. =head3 The C<$input_filename_or_reference> parameter The parameter, C<$input_filename_or_reference>, is used to define the -source of the uncompressed data. +source of the uncompressed data. It can take one of the following forms: @@ -235,17 +233,17 @@ If the C<$input_filename_or_reference> parameter is a filehandle, the input data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input_filename_or_reference> is a scalar reference, the input data will be read from C<$$input_filename_or_reference>. -=item An array reference +=item An array reference If C<$input_filename_or_reference> is an array reference, each element in the array must be a filename. -The input data will be read from each file in turn. +The input data will be read from each file in turn. The complete array will be walked to ensure that it only contains valid filenames before any data is compressed. @@ -253,8 +251,8 @@ contains valid filenames before any data is compressed. =item An Input FileGlob string If C<$input_filename_or_reference> is a string that is delimited by the -characters "<" and ">" C<bzip2> will assume that it is an -I<input fileglob string>. The input is the list of files that match the +characters "<" and ">" C<bzip2> will assume that it is an +I<input fileglob string>. The input is the list of files that match the fileglob. See L<File::GlobMapper|File::GlobMapper> for more details. @@ -275,7 +273,7 @@ these forms. =item A filename If the C<$output_filename_or_reference> parameter is a simple scalar, it is -assumed to be a filename. This file will be opened for writing and the +assumed to be a filename. This file will be opened for writing and the compressed data will be written to it. =item A filehandle @@ -284,14 +282,14 @@ If the C<$output_filename_or_reference> parameter is a filehandle, the compressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output_filename_or_reference> is a scalar reference, the compressed data will be stored in C<$$output_filename_or_reference>. =item An Array Reference -If C<$output_filename_or_reference> is an array reference, +If C<$output_filename_or_reference> is an array reference, the compressed data will be pushed onto the array. =item An Output FileGlob @@ -329,7 +327,7 @@ L</"Constructor Options"> section below. =item C<< AutoClose => 0|1 >> -This option applies to any input or output data streams to +This option applies to any input or output data streams to C<bzip2> that are filehandles. If C<AutoClose> is specified, and the value is true, it will result in all @@ -340,9 +338,7 @@ This parameter defaults to 0. =item C<< BinModeIn => 0|1 >> -When reading from a file or filehandle, set C<binmode> before reading. - -Defaults to 0. +This option is now a no-op. All files will be read in binmode. =item C<< Append => 0|1 >> @@ -371,7 +367,7 @@ written to it. Otherwise the file pointer will not be moved. =back -When C<Append> is specified, and set to true, it will I<append> all compressed +When C<Append> is specified, and set to true, it will I<append> all compressed data to the output data stream. So when the output is a filehandle it will carry out a seek to the eof @@ -415,7 +411,7 @@ compressed data to a buffer, C<$buffer>. my $input = new IO::File "<file1.txt" or die "Cannot open 'file1.txt': $!\n" ; my $buffer ; - bzip2 $input => \$buffer + bzip2 $input => \$buffer or die "bzip2 failed: $Bzip2Error\n"; To compress all files in the directory "/my/home" that match "*.txt" @@ -437,7 +433,7 @@ and if you want to compress each file one at a time, this will do the trick for my $input ( glob "/my/home/*.txt" ) { my $output = "$input.bz2" ; - bzip2 $input => $output + bzip2 $input => $output or die "Error compressing '$input': $Bzip2Error\n"; } @@ -450,14 +446,14 @@ The format of the constructor for C<IO::Compress::Bzip2> is shown below my $z = new IO::Compress::Bzip2 $output [,OPTS] or die "IO::Compress::Bzip2 failed: $Bzip2Error\n"; -It returns an C<IO::Compress::Bzip2> object on success and undef on failure. +It returns an C<IO::Compress::Bzip2> object on success and undef on failure. The variable C<$Bzip2Error> will contain an error message on failure. -If you are running Perl 5.005 or better the object, C<$z>, returned from -IO::Compress::Bzip2 can be used exactly like an L<IO::File|IO::File> filehandle. -This means that all normal output file operations can be carried out -with C<$z>. -For example, to write to a compressed file/buffer you can use either of +If you are running Perl 5.005 or better the object, C<$z>, returned from +IO::Compress::Bzip2 can be used exactly like an L<IO::File|IO::File> filehandle. +This means that all normal output file operations can be carried out +with C<$z>. +For example, to write to a compressed file/buffer you can use either of these forms $z->print("hello world\n"); @@ -480,7 +476,7 @@ If the C<$output> parameter is a filehandle, the compressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output> is a scalar reference, the compressed data will be stored in C<$$output>. @@ -507,7 +503,7 @@ This parameter defaults to 0. =item C<< Append => 0|1 >> -Opens C<$output> in append mode. +Opens C<$output> in append mode. The behaviour of this option is dependent on the type of C<$output>. @@ -537,7 +533,7 @@ This parameter defaults to 0. =item C<< BlockSize100K => number >> -Specify the number of 100K blocks bzip2 uses during compression. +Specify the number of 100K blocks bzip2 uses during compression. Valid values are from 1 to 9, where 9 is best compression. @@ -562,7 +558,7 @@ This is a placeholder option. TODO -=head1 Methods +=head1 Methods =head2 print @@ -672,7 +668,7 @@ This is a noop provided for completeness. $z->opened() -Returns true if the object currently refers to a opened file/buffer. +Returns true if the object currently refers to a opened file/buffer. =head2 autoflush @@ -695,7 +691,7 @@ retrieve the autoflush setting. $z->input_line_number() $z->input_line_number(EXPR) -This method always returns C<undef> when compressing. +This method always returns C<undef> when compressing. =head2 fileno @@ -714,7 +710,7 @@ C<undef>. $z->close() ; close $z ; -Flushes any pending compressed data and then closes the output file/buffer. +Flushes any pending compressed data and then closes the output file/buffer. For most versions of Perl this method will be automatically invoked if the IO::Compress::Bzip2 object is destroyed (either explicitly or by the @@ -747,9 +743,9 @@ the C<$z> object. See the L</"Constructor Options"> section for more details. -=head1 Importing +=head1 Importing -No symbolic constants are required by this IO::Compress::Bzip2 at present. +No symbolic constants are required by this IO::Compress::Bzip2 at present. =over 5 @@ -760,8 +756,6 @@ Same as doing this use IO::Compress::Bzip2 qw(bzip2 $Bzip2Error) ; - - =back =head1 EXAMPLES @@ -776,7 +770,7 @@ See L<IO::Compress::FAQ|IO::Compress::FAQ/"Compressed files and Net::FTP"> =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> +L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -790,7 +784,7 @@ See the module L<Compress::Bzip2|Compress::Bzip2> =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -798,7 +792,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Deflate.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Deflate.pm index 379ad9cd73..1ca86c9331 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Deflate.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Deflate.pm @@ -8,16 +8,16 @@ use bytes; require Exporter ; -use IO::Compress::RawDeflate 2.074 (); -use IO::Compress::Adapter::Deflate 2.074 ; +use IO::Compress::RawDeflate 2.084 (); +use IO::Compress::Adapter::Deflate 2.084 ; -use IO::Compress::Zlib::Constants 2.074 ; -use IO::Compress::Base::Common 2.074 qw(); +use IO::Compress::Zlib::Constants 2.084 ; +use IO::Compress::Base::Common 2.084 qw(); our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $DeflateError); -$VERSION = '2.074'; +$VERSION = '2.084'; $DeflateError = ''; @ISA = qw(IO::Compress::RawDeflate Exporter); @@ -170,14 +170,12 @@ __END__ =head1 NAME IO::Compress::Deflate - Write RFC 1950 files/buffers - - =head1 SYNOPSIS use IO::Compress::Deflate qw(deflate $DeflateError) ; - my $status = deflate $input => $output [,OPTS] + my $status = deflate $input => $output [,OPTS] or die "deflate failed: $DeflateError\n"; my $z = new IO::Compress::Deflate $output [,OPTS] @@ -197,9 +195,9 @@ IO::Compress::Deflate - Write RFC 1950 files/buffers $z->autoflush(); $z->input_line_number(); $z->newStream( [OPTS] ); - + $z->deflateParams(); - + $z->close() ; $DeflateError ; @@ -214,14 +212,14 @@ IO::Compress::Deflate - Write RFC 1950 files/buffers binmode $z fileno $z close $z ; - + =head1 DESCRIPTION This module provides a Perl interface that allows writing compressed data to files or buffer as defined in RFC 1950. -For reading RFC 1950 files/buffers, see the companion module +For reading RFC 1950 files/buffers, see the companion module L<IO::Uncompress::Inflate|IO::Uncompress::Inflate>. =head1 Functional Interface @@ -233,7 +231,7 @@ section. use IO::Compress::Deflate qw(deflate $DeflateError) ; - deflate $input_filename_or_reference => $output_filename_or_reference [,OPTS] + deflate $input_filename_or_reference => $output_filename_or_reference [,OPTS] or die "deflate failed: $DeflateError\n"; The functional interface needs Perl5.005 or better. @@ -246,7 +244,7 @@ C<$input_filename_or_reference> and C<$output_filename_or_reference>. =head3 The C<$input_filename_or_reference> parameter The parameter, C<$input_filename_or_reference>, is used to define the -source of the uncompressed data. +source of the uncompressed data. It can take one of the following forms: @@ -264,17 +262,17 @@ If the C<$input_filename_or_reference> parameter is a filehandle, the input data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input_filename_or_reference> is a scalar reference, the input data will be read from C<$$input_filename_or_reference>. -=item An array reference +=item An array reference If C<$input_filename_or_reference> is an array reference, each element in the array must be a filename. -The input data will be read from each file in turn. +The input data will be read from each file in turn. The complete array will be walked to ensure that it only contains valid filenames before any data is compressed. @@ -282,8 +280,8 @@ contains valid filenames before any data is compressed. =item An Input FileGlob string If C<$input_filename_or_reference> is a string that is delimited by the -characters "<" and ">" C<deflate> will assume that it is an -I<input fileglob string>. The input is the list of files that match the +characters "<" and ">" C<deflate> will assume that it is an +I<input fileglob string>. The input is the list of files that match the fileglob. See L<File::GlobMapper|File::GlobMapper> for more details. @@ -304,7 +302,7 @@ these forms. =item A filename If the C<$output_filename_or_reference> parameter is a simple scalar, it is -assumed to be a filename. This file will be opened for writing and the +assumed to be a filename. This file will be opened for writing and the compressed data will be written to it. =item A filehandle @@ -313,14 +311,14 @@ If the C<$output_filename_or_reference> parameter is a filehandle, the compressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output_filename_or_reference> is a scalar reference, the compressed data will be stored in C<$$output_filename_or_reference>. =item An Array Reference -If C<$output_filename_or_reference> is an array reference, +If C<$output_filename_or_reference> is an array reference, the compressed data will be pushed onto the array. =item An Output FileGlob @@ -358,7 +356,7 @@ L</"Constructor Options"> section below. =item C<< AutoClose => 0|1 >> -This option applies to any input or output data streams to +This option applies to any input or output data streams to C<deflate> that are filehandles. If C<AutoClose> is specified, and the value is true, it will result in all @@ -369,9 +367,7 @@ This parameter defaults to 0. =item C<< BinModeIn => 0|1 >> -When reading from a file or filehandle, set C<binmode> before reading. - -Defaults to 0. +This option is now a no-op. All files will be read in binmode. =item C<< Append => 0|1 >> @@ -400,7 +396,7 @@ written to it. Otherwise the file pointer will not be moved. =back -When C<Append> is specified, and set to true, it will I<append> all compressed +When C<Append> is specified, and set to true, it will I<append> all compressed data to the output data stream. So when the output is a filehandle it will carry out a seek to the eof @@ -444,7 +440,7 @@ compressed data to a buffer, C<$buffer>. my $input = new IO::File "<file1.txt" or die "Cannot open 'file1.txt': $!\n" ; my $buffer ; - deflate $input => \$buffer + deflate $input => \$buffer or die "deflate failed: $DeflateError\n"; To compress all files in the directory "/my/home" that match "*.txt" @@ -466,7 +462,7 @@ and if you want to compress each file one at a time, this will do the trick for my $input ( glob "/my/home/*.txt" ) { my $output = "$input.1950" ; - deflate $input => $output + deflate $input => $output or die "Error compressing '$input': $DeflateError\n"; } @@ -479,14 +475,14 @@ The format of the constructor for C<IO::Compress::Deflate> is shown below my $z = new IO::Compress::Deflate $output [,OPTS] or die "IO::Compress::Deflate failed: $DeflateError\n"; -It returns an C<IO::Compress::Deflate> object on success and undef on failure. +It returns an C<IO::Compress::Deflate> object on success and undef on failure. The variable C<$DeflateError> will contain an error message on failure. -If you are running Perl 5.005 or better the object, C<$z>, returned from -IO::Compress::Deflate can be used exactly like an L<IO::File|IO::File> filehandle. -This means that all normal output file operations can be carried out -with C<$z>. -For example, to write to a compressed file/buffer you can use either of +If you are running Perl 5.005 or better the object, C<$z>, returned from +IO::Compress::Deflate can be used exactly like an L<IO::File|IO::File> filehandle. +This means that all normal output file operations can be carried out +with C<$z>. +For example, to write to a compressed file/buffer you can use either of these forms $z->print("hello world\n"); @@ -509,7 +505,7 @@ If the C<$output> parameter is a filehandle, the compressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output> is a scalar reference, the compressed data will be stored in C<$$output>. @@ -536,7 +532,7 @@ This parameter defaults to 0. =item C<< Append => 0|1 >> -Opens C<$output> in append mode. +Opens C<$output> in append mode. The behaviour of this option is dependent on the type of C<$output>. @@ -568,20 +564,20 @@ This parameter defaults to 0. This option is used to compress input data and append it to an existing compressed data stream in C<$output>. The end result is a single compressed -data stream stored in C<$output>. +data stream stored in C<$output>. It is a fatal error to attempt to use this option when C<$output> is not an RFC 1950 data stream. There are a number of other limitations with the C<Merge> option: -=over 5 +=over 5 =item 1 This module needs to have been built with zlib 1.2.1 or better to work. A fatal error will be thrown if C<Merge> is used with an older version of -zlib. +zlib. =item 2 @@ -591,7 +587,7 @@ If C<$output> is a file or a filehandle, it must be seekable. This parameter defaults to 0. -=item -Level +=item -Level Defines the compression level used by zlib. The value should either be a number between 0 and 9 (0 means no compression and 9 is maximum @@ -610,7 +606,7 @@ Note, these constants are not imported by C<IO::Compress::Deflate> by default. use IO::Compress::Deflate qw(:constants); use IO::Compress::Deflate qw(:all); -=item -Strategy +=item -Strategy Defines the strategy used to tune the compression. Use one of the symbolic constants defined below. @@ -633,7 +629,7 @@ This is a placeholder option. TODO -=head1 Methods +=head1 Methods =head2 print @@ -751,7 +747,7 @@ This is a noop provided for completeness. $z->opened() -Returns true if the object currently refers to a opened file/buffer. +Returns true if the object currently refers to a opened file/buffer. =head2 autoflush @@ -774,7 +770,7 @@ retrieve the autoflush setting. $z->input_line_number() $z->input_line_number(EXPR) -This method always returns C<undef> when compressing. +This method always returns C<undef> when compressing. =head2 fileno @@ -793,7 +789,7 @@ C<undef>. $z->close() ; close $z ; -Flushes any pending compressed data and then closes the output file/buffer. +Flushes any pending compressed data and then closes the output file/buffer. For most versions of Perl this method will be automatically invoked if the IO::Compress::Deflate object is destroyed (either explicitly or by the @@ -834,9 +830,9 @@ Usage is TODO -=head1 Importing +=head1 Importing -A number of symbolic constants are required by some methods in +A number of symbolic constants are required by some methods in C<IO::Compress::Deflate>. None are imported by default. =over 5 @@ -884,9 +880,6 @@ These symbolic constants are used by the C<Strategy> option in the constructor. Z_FIXED Z_DEFAULT_STRATEGY - - - =back =head1 EXAMPLES @@ -901,7 +894,7 @@ See L<IO::Compress::FAQ|IO::Compress::FAQ/"Compressed files and Net::FTP"> =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> +L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -909,7 +902,7 @@ L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>, L<Archive::Tar|Archive::Tar>, L<IO::Zlib|IO::Zlib> -For RFC 1950, 1951 and 1952 see +For RFC 1950, 1951 and 1952 see L<http://www.faqs.org/rfcs/rfc1950.html>, L<http://www.faqs.org/rfcs/rfc1951.html> and L<http://www.faqs.org/rfcs/rfc1952.html> @@ -924,7 +917,7 @@ The primary site for gzip is L<http://www.gzip.org>. =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -932,7 +925,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/FAQ.pod b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/FAQ.pod index 7099418443..1e66507aa2 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/FAQ.pod +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/FAQ.pod @@ -7,7 +7,7 @@ IO::Compress::FAQ -- Frequently Asked Questions about IO::Compress Common questions answered. -=head1 GENERAL +=head1 GENERAL =head2 Compatibility with Unix compress/uncompress. @@ -104,7 +104,7 @@ recompression. my $gunzip = new IO::Uncompress::Gunzip $gzipFile or die "Cannot gunzip $gzipFile: $GunzipError\n" ; - bzip2 $gunzip => $bzipFile + bzip2 $gunzip => $bzipFile or die "Cannot bzip2 to $bzipFile: $Bzip2Error\n" ; Note, there is a limitation of this technique. Some compression file @@ -146,16 +146,16 @@ Only supported if the C<IO-Compress-Lzma> module is installed. Yes, both the C<IO-Compress-Zip> and C<IO-Uncompress-Unzip> modules support the zip feature called I<Zip64>. That allows them to read/write -files/buffers larger than 4Gig. +files/buffers larger than 4Gig. If you are creating a Zip file using the one-shot interface, and any of the input files is greater than 4Gig, a zip64 complaint zip file will be -created. +created. zip "really-large-file" => "my.zip"; Similarly with the one-shot interface, if the input is a buffer larger than -4 Gig, a zip64 complaint zip file will be created. +4 Gig, a zip64 complaint zip file will be created. zip \$really_large_buffer => "my.zip"; @@ -174,11 +174,11 @@ detect if the zip file is zip64. If you intend to manipulate the Zip64 zip files created with C<IO-Compress-Zip> using an external zip/unzip, make sure that it supports -Zip64. +Zip64. In particular, if you are using Info-Zip you need to have zip version 3.x or better to update a Zip64 archive and unzip version 6.x to read a zip64 -archive. +archive. =head2 Can I write more that 64K entries is a Zip files? @@ -209,7 +209,7 @@ The example below illustrates this behaviour $ echo abc | gzip -c >x.gz $ echo def | gzip -c >>x.gz - $ gunzip -c x.gz + $ gunzip -c x.gz abc def @@ -287,7 +287,7 @@ By default C<IO::Uncompress::Bzip2> will only uncompress the first bzip2 data stream in a pbzip2 file. To uncompress the complete pbzip2 file you must include the C<MultiStream> option, like this. - bunzip2 $input => \$output, MultiStream => 1 + bunzip2 $input => \$output, MultiStream => 1 or die "bunzip2 failed: $Bunzip2Error\n"; =head1 HTTP & NETWORK @@ -334,7 +334,7 @@ L<http://perl.apache.org/docs/tutorials/tips/mod_perl_tricks/mod_perl_tricks.htm return bless { r => $r, crc => crc32(undef), d => $d, - l => 0 + l => 0 },$class; } @@ -474,7 +474,7 @@ read from the FTP Server. gunzip $retr_fh => $outFilename, AutoClose => 1 or die "Cannot uncompress '$compressed_file': $GunzipError\n"; -and this to compress a file as it is written to the FTP Server +and this to compress a file as it is written to the FTP Server use Net::FTP; use IO::Compress::Gzip qw(:all); @@ -492,13 +492,13 @@ file/buffer and you want to read both. As an example consider the structure of a zip file. This is a well-defined file format that mixes both compressed and uncompressed sections of data in -a single file. +a single file. For the purposes of this discussion you can think of a zip file as sequence of compressed data streams, each of which is prefixed by an uncompressed local header. The local header contains information about the compressed data stream, including the name of the compressed file and, in particular, -the length of the compressed data stream. +the length of the compressed data stream. To illustrate how to use C<InputLength> here is a script that walks a zip file and prints out how many lines are in each compressed file (if you @@ -527,7 +527,7 @@ the other C<IO::Uncompress::*> modules. my $buffer; my $x ; - ($x = $fh->read($buffer, ZIP_LOCAL_HDR_LENGTH)) == ZIP_LOCAL_HDR_LENGTH + ($x = $fh->read($buffer, ZIP_LOCAL_HDR_LENGTH)) == ZIP_LOCAL_HDR_LENGTH or die "Truncated file: $!\n"; my $signature = unpack ("V", substr($buffer, 0, 4)); @@ -539,11 +539,11 @@ the other C<IO::Uncompress::*> modules. my $compressedMethod = unpack ("v", substr($buffer, 8, 2)); my $compressedLength = unpack ("V", substr($buffer, 18, 4)); my $uncompressedLength = unpack ("V", substr($buffer, 22, 4)); - my $filename_length = unpack ("v", substr($buffer, 26, 2)); + my $filename_length = unpack ("v", substr($buffer, 26, 2)); my $extra_length = unpack ("v", substr($buffer, 28, 2)); my $filename ; - $fh->read($filename, $filename_length) == $filename_length + $fh->read($filename, $filename_length) == $filename_length or die "Truncated file\n"; $fh->read($buffer, $extra_length) == $extra_length @@ -582,7 +582,7 @@ the other C<IO::Uncompress::*> modules. } The majority of the code above is concerned with reading the zip local -header data. The code that I want to focus on is at the bottom. +header data. The code that I want to focus on is at the bottom. while (1) { @@ -613,9 +613,9 @@ the C<$fh> filehandle (The only exception is for an error case like a truncated file or a corrupt data stream). This means that once RawInflate is finished C<$fh> will be left at the -byte directly after the compressed data stream. +byte directly after the compressed data stream. -Now consider what the code looks like without C<InputLength> +Now consider what the code looks like without C<InputLength> while (1) { @@ -654,11 +654,11 @@ application can cope with large compressed data streams. One final point -- obviously C<InputLength> can only be used whenever you know the length of the compressed data beforehand, like here with a zip -file. +file. =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> +L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -668,7 +668,7 @@ L<IO::Zlib|IO::Zlib> =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -676,7 +676,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Gzip.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Gzip.pm index db01764624..5302011a20 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Gzip.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Gzip.pm @@ -8,12 +8,12 @@ use bytes; require Exporter ; -use IO::Compress::RawDeflate 2.074 () ; -use IO::Compress::Adapter::Deflate 2.074 ; +use IO::Compress::RawDeflate 2.084 () ; +use IO::Compress::Adapter::Deflate 2.084 ; -use IO::Compress::Base::Common 2.074 qw(:Status ); -use IO::Compress::Gzip::Constants 2.074 ; -use IO::Compress::Zlib::Extra 2.074 ; +use IO::Compress::Base::Common 2.084 qw(:Status ); +use IO::Compress::Gzip::Constants 2.084 ; +use IO::Compress::Zlib::Extra 2.084 ; BEGIN { @@ -25,7 +25,7 @@ BEGIN our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $GzipError); -$VERSION = '2.074'; +$VERSION = '2.084'; $GzipError = '' ; @ISA = qw(IO::Compress::RawDeflate Exporter); @@ -277,14 +277,12 @@ __END__ =head1 NAME IO::Compress::Gzip - Write RFC 1952 files/buffers - - =head1 SYNOPSIS use IO::Compress::Gzip qw(gzip $GzipError) ; - my $status = gzip $input => $output [,OPTS] + my $status = gzip $input => $output [,OPTS] or die "gzip failed: $GzipError\n"; my $z = new IO::Compress::Gzip $output [,OPTS] @@ -304,9 +302,9 @@ IO::Compress::Gzip - Write RFC 1952 files/buffers $z->autoflush(); $z->input_line_number(); $z->newStream( [OPTS] ); - + $z->deflateParams(); - + $z->close() ; $GzipError ; @@ -321,7 +319,7 @@ IO::Compress::Gzip - Write RFC 1952 files/buffers binmode $z fileno $z close $z ; - + =head1 DESCRIPTION @@ -331,7 +329,7 @@ data to files or buffer as defined in RFC 1952. All the gzip headers defined in RFC 1952 can be created using this module. -For reading RFC 1952 files/buffers, see the companion module +For reading RFC 1952 files/buffers, see the companion module L<IO::Uncompress::Gunzip|IO::Uncompress::Gunzip>. =head1 Functional Interface @@ -343,7 +341,7 @@ section. use IO::Compress::Gzip qw(gzip $GzipError) ; - gzip $input_filename_or_reference => $output_filename_or_reference [,OPTS] + gzip $input_filename_or_reference => $output_filename_or_reference [,OPTS] or die "gzip failed: $GzipError\n"; The functional interface needs Perl5.005 or better. @@ -356,7 +354,7 @@ C<$input_filename_or_reference> and C<$output_filename_or_reference>. =head3 The C<$input_filename_or_reference> parameter The parameter, C<$input_filename_or_reference>, is used to define the -source of the uncompressed data. +source of the uncompressed data. It can take one of the following forms: @@ -374,17 +372,17 @@ If the C<$input_filename_or_reference> parameter is a filehandle, the input data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input_filename_or_reference> is a scalar reference, the input data will be read from C<$$input_filename_or_reference>. -=item An array reference +=item An array reference If C<$input_filename_or_reference> is an array reference, each element in the array must be a filename. -The input data will be read from each file in turn. +The input data will be read from each file in turn. The complete array will be walked to ensure that it only contains valid filenames before any data is compressed. @@ -392,8 +390,8 @@ contains valid filenames before any data is compressed. =item An Input FileGlob string If C<$input_filename_or_reference> is a string that is delimited by the -characters "<" and ">" C<gzip> will assume that it is an -I<input fileglob string>. The input is the list of files that match the +characters "<" and ">" C<gzip> will assume that it is an +I<input fileglob string>. The input is the list of files that match the fileglob. See L<File::GlobMapper|File::GlobMapper> for more details. @@ -403,7 +401,7 @@ See L<File::GlobMapper|File::GlobMapper> for more details. If the C<$input_filename_or_reference> parameter is any other type, C<undef> will be returned. -In addition, if C<$input_filename_or_reference> is a simple filename, +In addition, if C<$input_filename_or_reference> is a simple filename, the default values for the C<Name> and C<Time> options will be sourced from that file. @@ -422,7 +420,7 @@ these forms. =item A filename If the C<$output_filename_or_reference> parameter is a simple scalar, it is -assumed to be a filename. This file will be opened for writing and the +assumed to be a filename. This file will be opened for writing and the compressed data will be written to it. =item A filehandle @@ -431,14 +429,14 @@ If the C<$output_filename_or_reference> parameter is a filehandle, the compressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output_filename_or_reference> is a scalar reference, the compressed data will be stored in C<$$output_filename_or_reference>. =item An Array Reference -If C<$output_filename_or_reference> is an array reference, +If C<$output_filename_or_reference> is an array reference, the compressed data will be pushed onto the array. =item An Output FileGlob @@ -476,7 +474,7 @@ L</"Constructor Options"> section below. =item C<< AutoClose => 0|1 >> -This option applies to any input or output data streams to +This option applies to any input or output data streams to C<gzip> that are filehandles. If C<AutoClose> is specified, and the value is true, it will result in all @@ -487,9 +485,7 @@ This parameter defaults to 0. =item C<< BinModeIn => 0|1 >> -When reading from a file or filehandle, set C<binmode> before reading. - -Defaults to 0. +This option is now a no-op. All files will be read in binmode. =item C<< Append => 0|1 >> @@ -518,7 +514,7 @@ written to it. Otherwise the file pointer will not be moved. =back -When C<Append> is specified, and set to true, it will I<append> all compressed +When C<Append> is specified, and set to true, it will I<append> all compressed data to the output data stream. So when the output is a filehandle it will carry out a seek to the eof @@ -562,7 +558,7 @@ compressed data to a buffer, C<$buffer>. my $input = new IO::File "<file1.txt" or die "Cannot open 'file1.txt': $!\n" ; my $buffer ; - gzip $input => \$buffer + gzip $input => \$buffer or die "gzip failed: $GzipError\n"; To compress all files in the directory "/my/home" that match "*.txt" @@ -584,7 +580,7 @@ and if you want to compress each file one at a time, this will do the trick for my $input ( glob "/my/home/*.txt" ) { my $output = "$input.gz" ; - gzip $input => $output + gzip $input => $output or die "Error compressing '$input': $GzipError\n"; } @@ -597,14 +593,14 @@ The format of the constructor for C<IO::Compress::Gzip> is shown below my $z = new IO::Compress::Gzip $output [,OPTS] or die "IO::Compress::Gzip failed: $GzipError\n"; -It returns an C<IO::Compress::Gzip> object on success and undef on failure. +It returns an C<IO::Compress::Gzip> object on success and undef on failure. The variable C<$GzipError> will contain an error message on failure. -If you are running Perl 5.005 or better the object, C<$z>, returned from -IO::Compress::Gzip can be used exactly like an L<IO::File|IO::File> filehandle. -This means that all normal output file operations can be carried out -with C<$z>. -For example, to write to a compressed file/buffer you can use either of +If you are running Perl 5.005 or better the object, C<$z>, returned from +IO::Compress::Gzip can be used exactly like an L<IO::File|IO::File> filehandle. +This means that all normal output file operations can be carried out +with C<$z>. +For example, to write to a compressed file/buffer you can use either of these forms $z->print("hello world\n"); @@ -627,7 +623,7 @@ If the C<$output> parameter is a filehandle, the compressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output> is a scalar reference, the compressed data will be stored in C<$$output>. @@ -654,7 +650,7 @@ This parameter defaults to 0. =item C<< Append => 0|1 >> -Opens C<$output> in append mode. +Opens C<$output> in append mode. The behaviour of this option is dependent on the type of C<$output>. @@ -686,20 +682,20 @@ This parameter defaults to 0. This option is used to compress input data and append it to an existing compressed data stream in C<$output>. The end result is a single compressed -data stream stored in C<$output>. +data stream stored in C<$output>. It is a fatal error to attempt to use this option when C<$output> is not an RFC 1952 data stream. There are a number of other limitations with the C<Merge> option: -=over 5 +=over 5 =item 1 This module needs to have been built with zlib 1.2.1 or better to work. A fatal error will be thrown if C<Merge> is used with an older version of -zlib. +zlib. =item 2 @@ -709,7 +705,7 @@ If C<$output> is a file or a filehandle, it must be seekable. This parameter defaults to 0. -=item -Level +=item -Level Defines the compression level used by zlib. The value should either be a number between 0 and 9 (0 means no compression and 9 is maximum @@ -728,7 +724,7 @@ Note, these constants are not imported by C<IO::Compress::Gzip> by default. use IO::Compress::Gzip qw(:constants); use IO::Compress::Gzip qw(:all); -=item -Strategy +=item -Strategy Defines the strategy used to tune the compression. Use one of the symbolic constants defined below. @@ -747,7 +743,7 @@ If specified, this option will force the creation of the smallest possible compliant gzip header (which is exactly 10 bytes long) as defined in RFC 1952. -See the section titled "Compliance" in RFC 1952 for a definition +See the section titled "Compliance" in RFC 1952 for a definition of the values used for the fields in the gzip header. All other parameters that control the content of the gzip header will @@ -793,7 +789,7 @@ This parameter controls the setting of the FLG.FTEXT bit in the gzip header. It is used to signal that the data stored in the gzip file/buffer is probably text. -The default is 0. +The default is 0. =item C<< HeaderCRC => 0|1 >> @@ -879,12 +875,12 @@ If C<Strict> is enabled the following behaviour will be policed: =over 5 -=item * +=item * The value supplied with the C<Name> option can only contain ISO 8859-1 characters. -=item * +=item * The value supplied with the C<Comment> option can only contain ISO 8859-1 characters plus line-feed. @@ -894,12 +890,12 @@ characters plus line-feed. The values supplied with the C<-Name> and C<-Comment> options cannot contain multiple embedded nulls. -=item * +=item * If an C<ExtraField> option is specified and it is a simple scalar, it must conform to the sub-field structure as defined in RFC 1952. -=item * +=item * If an C<ExtraField> option is specified the second byte of the ID will be checked in each subfield to ensure that it does not contain the reserved @@ -911,12 +907,12 @@ When C<Strict> is disabled the following behaviour will be policed: =over 5 -=item * +=item * The value supplied with C<-Name> option can contain any character except NULL. -=item * +=item * The value supplied with C<-Comment> option can contain any character except NULL. @@ -928,12 +924,12 @@ multiple embedded nulls. The string written to the gzip header will consist of the characters up to, but not including, the first embedded NULL. -=item * +=item * If an C<ExtraField> option is specified and it is a simple scalar, the structure will not be checked. The only error is if the length is too big. -=item * +=item * The ID header in an C<ExtraField> sub-field can consist of any two bytes. @@ -945,7 +941,7 @@ The ID header in an C<ExtraField> sub-field can consist of any two bytes. TODO -=head1 Methods +=head1 Methods =head2 print @@ -1063,7 +1059,7 @@ This is a noop provided for completeness. $z->opened() -Returns true if the object currently refers to a opened file/buffer. +Returns true if the object currently refers to a opened file/buffer. =head2 autoflush @@ -1086,7 +1082,7 @@ retrieve the autoflush setting. $z->input_line_number() $z->input_line_number(EXPR) -This method always returns C<undef> when compressing. +This method always returns C<undef> when compressing. =head2 fileno @@ -1105,7 +1101,7 @@ C<undef>. $z->close() ; close $z ; -Flushes any pending compressed data and then closes the output file/buffer. +Flushes any pending compressed data and then closes the output file/buffer. For most versions of Perl this method will be automatically invoked if the IO::Compress::Gzip object is destroyed (either explicitly or by the @@ -1146,9 +1142,9 @@ Usage is TODO -=head1 Importing +=head1 Importing -A number of symbolic constants are required by some methods in +A number of symbolic constants are required by some methods in C<IO::Compress::Gzip>. None are imported by default. =over 5 @@ -1196,9 +1192,6 @@ These symbolic constants are used by the C<Strategy> option in the constructor. Z_FIXED Z_DEFAULT_STRATEGY - - - =back =head1 EXAMPLES @@ -1213,7 +1206,7 @@ See L<IO::Compress::FAQ|IO::Compress::FAQ/"Compressed files and Net::FTP"> =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> +L<Compress::Zlib>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -1221,7 +1214,7 @@ L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>, L<Archive::Tar|Archive::Tar>, L<IO::Zlib|IO::Zlib> -For RFC 1950, 1951 and 1952 see +For RFC 1950, 1951 and 1952 see L<http://www.faqs.org/rfcs/rfc1950.html>, L<http://www.faqs.org/rfcs/rfc1951.html> and L<http://www.faqs.org/rfcs/rfc1952.html> @@ -1236,7 +1229,7 @@ The primary site for gzip is L<http://www.gzip.org>. =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -1244,7 +1237,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Gzip/Constants.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Gzip/Constants.pm index 8186bf325e..d1bd0c2bb2 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Gzip/Constants.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/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.074'; +$VERSION = '2.084'; @ISA = qw(Exporter); diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/RawDeflate.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/RawDeflate.pm index bc1b71eefe..b2f38ff402 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/RawDeflate.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/RawDeflate.pm @@ -6,15 +6,15 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base 2.074 ; -use IO::Compress::Base::Common 2.074 qw(:Status ); -use IO::Compress::Adapter::Deflate 2.074 ; +use IO::Compress::Base 2.084 ; +use IO::Compress::Base::Common 2.084 qw(:Status ); +use IO::Compress::Adapter::Deflate 2.084 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %DEFLATE_CONSTANTS, %EXPORT_TAGS, $RawDeflateError); -$VERSION = '2.074'; +$VERSION = '2.084'; $RawDeflateError = ''; @ISA = qw(IO::Compress::Base Exporter); @@ -116,8 +116,8 @@ sub getExtraParams return getZlibParams(); } -use IO::Compress::Base::Common 2.074 qw(:Parse); -use Compress::Raw::Zlib 2.074 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); +use IO::Compress::Base::Common 2.084 qw(:Parse); +use Compress::Raw::Zlib 2.084 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); our %PARAMS = ( #'method' => [IO::Compress::Base::Common::Parse_unsigned, Z_DEFLATED], 'level' => [IO::Compress::Base::Common::Parse_signed, Z_DEFAULT_COMPRESSION], @@ -223,14 +223,12 @@ __END__ =head1 NAME IO::Compress::RawDeflate - Write RFC 1951 files/buffers - - =head1 SYNOPSIS use IO::Compress::RawDeflate qw(rawdeflate $RawDeflateError) ; - my $status = rawdeflate $input => $output [,OPTS] + my $status = rawdeflate $input => $output [,OPTS] or die "rawdeflate failed: $RawDeflateError\n"; my $z = new IO::Compress::RawDeflate $output [,OPTS] @@ -250,9 +248,9 @@ IO::Compress::RawDeflate - Write RFC 1951 files/buffers $z->autoflush(); $z->input_line_number(); $z->newStream( [OPTS] ); - + $z->deflateParams(); - + $z->close() ; $RawDeflateError ; @@ -267,7 +265,7 @@ IO::Compress::RawDeflate - Write RFC 1951 files/buffers binmode $z fileno $z close $z ; - + =head1 DESCRIPTION @@ -277,7 +275,7 @@ data to files or buffer as defined in RFC 1951. Note that RFC 1951 data is not a good choice of compression format to use in isolation, especially if you want to auto-detect it. -For reading RFC 1951 files/buffers, see the companion module +For reading RFC 1951 files/buffers, see the companion module L<IO::Uncompress::RawInflate|IO::Uncompress::RawInflate>. =head1 Functional Interface @@ -289,7 +287,7 @@ section. use IO::Compress::RawDeflate qw(rawdeflate $RawDeflateError) ; - rawdeflate $input_filename_or_reference => $output_filename_or_reference [,OPTS] + rawdeflate $input_filename_or_reference => $output_filename_or_reference [,OPTS] or die "rawdeflate failed: $RawDeflateError\n"; The functional interface needs Perl5.005 or better. @@ -302,7 +300,7 @@ C<$input_filename_or_reference> and C<$output_filename_or_reference>. =head3 The C<$input_filename_or_reference> parameter The parameter, C<$input_filename_or_reference>, is used to define the -source of the uncompressed data. +source of the uncompressed data. It can take one of the following forms: @@ -320,17 +318,17 @@ If the C<$input_filename_or_reference> parameter is a filehandle, the input data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input_filename_or_reference> is a scalar reference, the input data will be read from C<$$input_filename_or_reference>. -=item An array reference +=item An array reference If C<$input_filename_or_reference> is an array reference, each element in the array must be a filename. -The input data will be read from each file in turn. +The input data will be read from each file in turn. The complete array will be walked to ensure that it only contains valid filenames before any data is compressed. @@ -338,8 +336,8 @@ contains valid filenames before any data is compressed. =item An Input FileGlob string If C<$input_filename_or_reference> is a string that is delimited by the -characters "<" and ">" C<rawdeflate> will assume that it is an -I<input fileglob string>. The input is the list of files that match the +characters "<" and ">" C<rawdeflate> will assume that it is an +I<input fileglob string>. The input is the list of files that match the fileglob. See L<File::GlobMapper|File::GlobMapper> for more details. @@ -360,7 +358,7 @@ these forms. =item A filename If the C<$output_filename_or_reference> parameter is a simple scalar, it is -assumed to be a filename. This file will be opened for writing and the +assumed to be a filename. This file will be opened for writing and the compressed data will be written to it. =item A filehandle @@ -369,14 +367,14 @@ If the C<$output_filename_or_reference> parameter is a filehandle, the compressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output_filename_or_reference> is a scalar reference, the compressed data will be stored in C<$$output_filename_or_reference>. =item An Array Reference -If C<$output_filename_or_reference> is an array reference, +If C<$output_filename_or_reference> is an array reference, the compressed data will be pushed onto the array. =item An Output FileGlob @@ -414,7 +412,7 @@ L</"Constructor Options"> section below. =item C<< AutoClose => 0|1 >> -This option applies to any input or output data streams to +This option applies to any input or output data streams to C<rawdeflate> that are filehandles. If C<AutoClose> is specified, and the value is true, it will result in all @@ -425,9 +423,7 @@ This parameter defaults to 0. =item C<< BinModeIn => 0|1 >> -When reading from a file or filehandle, set C<binmode> before reading. - -Defaults to 0. +This option is now a no-op. All files will be read in binmode. =item C<< Append => 0|1 >> @@ -456,7 +452,7 @@ written to it. Otherwise the file pointer will not be moved. =back -When C<Append> is specified, and set to true, it will I<append> all compressed +When C<Append> is specified, and set to true, it will I<append> all compressed data to the output data stream. So when the output is a filehandle it will carry out a seek to the eof @@ -500,7 +496,7 @@ compressed data to a buffer, C<$buffer>. my $input = new IO::File "<file1.txt" or die "Cannot open 'file1.txt': $!\n" ; my $buffer ; - rawdeflate $input => \$buffer + rawdeflate $input => \$buffer or die "rawdeflate failed: $RawDeflateError\n"; To compress all files in the directory "/my/home" that match "*.txt" @@ -522,7 +518,7 @@ and if you want to compress each file one at a time, this will do the trick for my $input ( glob "/my/home/*.txt" ) { my $output = "$input.1951" ; - rawdeflate $input => $output + rawdeflate $input => $output or die "Error compressing '$input': $RawDeflateError\n"; } @@ -535,14 +531,14 @@ The format of the constructor for C<IO::Compress::RawDeflate> is shown below my $z = new IO::Compress::RawDeflate $output [,OPTS] or die "IO::Compress::RawDeflate failed: $RawDeflateError\n"; -It returns an C<IO::Compress::RawDeflate> object on success and undef on failure. +It returns an C<IO::Compress::RawDeflate> object on success and undef on failure. The variable C<$RawDeflateError> will contain an error message on failure. -If you are running Perl 5.005 or better the object, C<$z>, returned from -IO::Compress::RawDeflate can be used exactly like an L<IO::File|IO::File> filehandle. -This means that all normal output file operations can be carried out -with C<$z>. -For example, to write to a compressed file/buffer you can use either of +If you are running Perl 5.005 or better the object, C<$z>, returned from +IO::Compress::RawDeflate can be used exactly like an L<IO::File|IO::File> filehandle. +This means that all normal output file operations can be carried out +with C<$z>. +For example, to write to a compressed file/buffer you can use either of these forms $z->print("hello world\n"); @@ -565,7 +561,7 @@ If the C<$output> parameter is a filehandle, the compressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output> is a scalar reference, the compressed data will be stored in C<$$output>. @@ -592,7 +588,7 @@ This parameter defaults to 0. =item C<< Append => 0|1 >> -Opens C<$output> in append mode. +Opens C<$output> in append mode. The behaviour of this option is dependent on the type of C<$output>. @@ -624,20 +620,20 @@ This parameter defaults to 0. This option is used to compress input data and append it to an existing compressed data stream in C<$output>. The end result is a single compressed -data stream stored in C<$output>. +data stream stored in C<$output>. It is a fatal error to attempt to use this option when C<$output> is not an RFC 1951 data stream. There are a number of other limitations with the C<Merge> option: -=over 5 +=over 5 =item 1 This module needs to have been built with zlib 1.2.1 or better to work. A fatal error will be thrown if C<Merge> is used with an older version of -zlib. +zlib. =item 2 @@ -647,7 +643,7 @@ If C<$output> is a file or a filehandle, it must be seekable. This parameter defaults to 0. -=item -Level +=item -Level Defines the compression level used by zlib. The value should either be a number between 0 and 9 (0 means no compression and 9 is maximum @@ -666,7 +662,7 @@ Note, these constants are not imported by C<IO::Compress::RawDeflate> by default use IO::Compress::RawDeflate qw(:constants); use IO::Compress::RawDeflate qw(:all); -=item -Strategy +=item -Strategy Defines the strategy used to tune the compression. Use one of the symbolic constants defined below. @@ -689,7 +685,7 @@ This is a placeholder option. TODO -=head1 Methods +=head1 Methods =head2 print @@ -807,7 +803,7 @@ This is a noop provided for completeness. $z->opened() -Returns true if the object currently refers to a opened file/buffer. +Returns true if the object currently refers to a opened file/buffer. =head2 autoflush @@ -830,7 +826,7 @@ retrieve the autoflush setting. $z->input_line_number() $z->input_line_number(EXPR) -This method always returns C<undef> when compressing. +This method always returns C<undef> when compressing. =head2 fileno @@ -849,7 +845,7 @@ C<undef>. $z->close() ; close $z ; -Flushes any pending compressed data and then closes the output file/buffer. +Flushes any pending compressed data and then closes the output file/buffer. For most versions of Perl this method will be automatically invoked if the IO::Compress::RawDeflate object is destroyed (either explicitly or by the @@ -890,9 +886,9 @@ Usage is TODO -=head1 Importing +=head1 Importing -A number of symbolic constants are required by some methods in +A number of symbolic constants are required by some methods in C<IO::Compress::RawDeflate>. None are imported by default. =over 5 @@ -940,9 +936,6 @@ These symbolic constants are used by the C<Strategy> option in the constructor. Z_FIXED Z_DEFAULT_STRATEGY - - - =back =head1 EXAMPLES @@ -957,7 +950,7 @@ See L<IO::Compress::FAQ|IO::Compress::FAQ/"Compressed files and Net::FTP"> =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> +L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -965,7 +958,7 @@ L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>, L<Archive::Tar|Archive::Tar>, L<IO::Zlib|IO::Zlib> -For RFC 1950, 1951 and 1952 see +For RFC 1950, 1951 and 1952 see L<http://www.faqs.org/rfcs/rfc1950.html>, L<http://www.faqs.org/rfcs/rfc1951.html> and L<http://www.faqs.org/rfcs/rfc1952.html> @@ -980,7 +973,7 @@ The primary site for gzip is L<http://www.gzip.org>. =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -988,7 +981,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zip.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zip.pm index 07c72d6706..eabeef63e7 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zip.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zip.pm @@ -4,30 +4,30 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base::Common 2.074 qw(:Status ); -use IO::Compress::RawDeflate 2.074 (); -use IO::Compress::Adapter::Deflate 2.074 ; -use IO::Compress::Adapter::Identity 2.074 ; -use IO::Compress::Zlib::Extra 2.074 ; -use IO::Compress::Zip::Constants 2.074 ; +use IO::Compress::Base::Common 2.084 qw(:Status ); +use IO::Compress::RawDeflate 2.084 (); +use IO::Compress::Adapter::Deflate 2.084 ; +use IO::Compress::Adapter::Identity 2.084 ; +use IO::Compress::Zlib::Extra 2.084 ; +use IO::Compress::Zip::Constants 2.084 ; use File::Spec(); use Config; -use Compress::Raw::Zlib 2.074 (); +use Compress::Raw::Zlib 2.084 (); BEGIN { eval { require IO::Compress::Adapter::Bzip2 ; - import IO::Compress::Adapter::Bzip2 2.074 ; + import IO::Compress::Adapter::Bzip2 2.084 ; require IO::Compress::Bzip2 ; - import IO::Compress::Bzip2 2.074 ; + import IO::Compress::Bzip2 2.084 ; } ; eval { require IO::Compress::Adapter::Lzma ; - import IO::Compress::Adapter::Lzma 2.074 ; + import IO::Compress::Adapter::Lzma 2.084 ; require IO::Compress::Lzma ; - import IO::Compress::Lzma 2.074 ; + import IO::Compress::Lzma 2.084 ; } ; } @@ -36,7 +36,7 @@ require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $ZipError); -$VERSION = '2.074'; +$VERSION = '2.084'; $ZipError = ''; @ISA = qw(IO::Compress::RawDeflate Exporter); @@ -863,14 +863,12 @@ __END__ =head1 NAME IO::Compress::Zip - Write zip files/buffers - - =head1 SYNOPSIS use IO::Compress::Zip qw(zip $ZipError) ; - my $status = zip $input => $output [,OPTS] + my $status = zip $input => $output [,OPTS] or die "zip failed: $ZipError\n"; my $z = new IO::Compress::Zip $output [,OPTS] @@ -890,9 +888,9 @@ IO::Compress::Zip - Write zip files/buffers $z->autoflush(); $z->input_line_number(); $z->newStream( [OPTS] ); - + $z->deflateParams(); - + $z->close() ; $ZipError ; @@ -907,16 +905,16 @@ IO::Compress::Zip - Write zip files/buffers binmode $z fileno $z close $z ; - + =head1 DESCRIPTION -This module provides a Perl interface that allows writing zip +This module provides a Perl interface that allows writing zip compressed data to files or buffer. The primary purpose of this module is to provide streaming write access to zip files and buffers. It is not a general-purpose file archiver. If that -is what you want, check out C<Archive::Zip>. +is what you want, check out C<Archive::Zip> or C<Archive::Zip::SimpleZip>. At present three compression methods are supported by IO::Compress::Zip, namely Store (no compression at all), Deflate, Bzip2 and LZMA. @@ -927,7 +925,7 @@ be installed. Note that to create LZMA content, the module C<IO::Compress::Lzma> must be installed. -For reading zip files/buffers, see the companion module +For reading zip files/buffers, see the companion module L<IO::Uncompress::Unzip|IO::Uncompress::Unzip>. =head1 Functional Interface @@ -939,7 +937,7 @@ section. use IO::Compress::Zip qw(zip $ZipError) ; - zip $input_filename_or_reference => $output_filename_or_reference [,OPTS] + zip $input_filename_or_reference => $output_filename_or_reference [,OPTS] or die "zip failed: $ZipError\n"; The functional interface needs Perl5.005 or better. @@ -952,7 +950,7 @@ C<$input_filename_or_reference> and C<$output_filename_or_reference>. =head3 The C<$input_filename_or_reference> parameter The parameter, C<$input_filename_or_reference>, is used to define the -source of the uncompressed data. +source of the uncompressed data. It can take one of the following forms: @@ -970,17 +968,17 @@ If the C<$input_filename_or_reference> parameter is a filehandle, the input data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input_filename_or_reference> is a scalar reference, the input data will be read from C<$$input_filename_or_reference>. -=item An array reference +=item An array reference If C<$input_filename_or_reference> is an array reference, each element in the array must be a filename. -The input data will be read from each file in turn. +The input data will be read from each file in turn. The complete array will be walked to ensure that it only contains valid filenames before any data is compressed. @@ -988,8 +986,8 @@ contains valid filenames before any data is compressed. =item An Input FileGlob string If C<$input_filename_or_reference> is a string that is delimited by the -characters "<" and ">" C<zip> will assume that it is an -I<input fileglob string>. The input is the list of files that match the +characters "<" and ">" C<zip> will assume that it is an +I<input fileglob string>. The input is the list of files that match the fileglob. See L<File::GlobMapper|File::GlobMapper> for more details. @@ -999,7 +997,7 @@ See L<File::GlobMapper|File::GlobMapper> for more details. If the C<$input_filename_or_reference> parameter is any other type, C<undef> will be returned. -In addition, if C<$input_filename_or_reference> is a simple filename, +In addition, if C<$input_filename_or_reference> is a simple filename, the default values for the C<Name>, C<Time>, C<TextFlag>, C<ExtAttr>, C<exUnixN> and C<exTime> options will be sourced from that file. @@ -1018,7 +1016,7 @@ these forms. =item A filename If the C<$output_filename_or_reference> parameter is a simple scalar, it is -assumed to be a filename. This file will be opened for writing and the +assumed to be a filename. This file will be opened for writing and the compressed data will be written to it. =item A filehandle @@ -1027,14 +1025,14 @@ If the C<$output_filename_or_reference> parameter is a filehandle, the compressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output_filename_or_reference> is a scalar reference, the compressed data will be stored in C<$$output_filename_or_reference>. =item An Array Reference -If C<$output_filename_or_reference> is an array reference, +If C<$output_filename_or_reference> is an array reference, the compressed data will be pushed onto the array. =item An Output FileGlob @@ -1072,7 +1070,7 @@ L</"Constructor Options"> section below. =item C<< AutoClose => 0|1 >> -This option applies to any input or output data streams to +This option applies to any input or output data streams to C<zip> that are filehandles. If C<AutoClose> is specified, and the value is true, it will result in all @@ -1083,9 +1081,7 @@ This parameter defaults to 0. =item C<< BinModeIn => 0|1 >> -When reading from a file or filehandle, set C<binmode> before reading. - -Defaults to 0. +This option is now a no-op. All files will be read in binmode. =item C<< Append => 0|1 >> @@ -1114,7 +1110,7 @@ written to it. Otherwise the file pointer will not be moved. =back -When C<Append> is specified, and set to true, it will I<append> all compressed +When C<Append> is specified, and set to true, it will I<append> all compressed data to the output data stream. So when the output is a filehandle it will carry out a seek to the eof @@ -1158,7 +1154,7 @@ compressed data to a buffer, C<$buffer>. my $input = new IO::File "<file1.txt" or die "Cannot open 'file1.txt': $!\n" ; my $buffer ; - zip $input => \$buffer + zip $input => \$buffer or die "zip failed: $ZipError\n"; To create a zip file, C<output.zip>, that contains the compressed contents @@ -1197,14 +1193,14 @@ The format of the constructor for C<IO::Compress::Zip> is shown below my $z = new IO::Compress::Zip $output [,OPTS] or die "IO::Compress::Zip failed: $ZipError\n"; -It returns an C<IO::Compress::Zip> object on success and undef on failure. +It returns an C<IO::Compress::Zip> object on success and undef on failure. The variable C<$ZipError> will contain an error message on failure. -If you are running Perl 5.005 or better the object, C<$z>, returned from -IO::Compress::Zip can be used exactly like an L<IO::File|IO::File> filehandle. -This means that all normal output file operations can be carried out -with C<$z>. -For example, to write to a compressed file/buffer you can use either of +If you are running Perl 5.005 or better the object, C<$z>, returned from +IO::Compress::Zip can be used exactly like an L<IO::File|IO::File> filehandle. +This means that all normal output file operations can be carried out +with C<$z>. +For example, to write to a compressed file/buffer you can use either of these forms $z->print("hello world\n"); @@ -1227,7 +1223,7 @@ If the C<$output> parameter is a filehandle, the compressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output> is a scalar reference, the compressed data will be stored in C<$$output>. @@ -1254,7 +1250,7 @@ This parameter defaults to 0. =item C<< Append => 0|1 >> -Opens C<$output> in append mode. +Opens C<$output> in append mode. The behaviour of this option is dependent on the type of C<$output>. @@ -1284,7 +1280,7 @@ This parameter defaults to 0. =item C<< Name => $string >> -Stores the contents of C<$string> in the zip filename header field. +Stores the contents of C<$string> in the zip filename header field. If C<Name> is not specified and the C<$input> parameter is a filename, the value of C<$input> will be used for the zip filename header field. @@ -1306,7 +1302,7 @@ to create a non-standard Zip file. This is what APPNOTE.TXT has to say on what should be stored in the zip filename header field. - The name of the file, with optional relative path. + The name of the file, with optional relative path. The path stored should not contain a drive or device letter, or a leading slash. All slashes should be forward slashes '/' as opposed to @@ -1344,8 +1340,8 @@ filenames before they are stored in C<$zipfile>. my $dir = shift ; zip [ <$dir/*.txt> ] => $zipfile, - FilterName => sub { s[^$dir/][] } ; - } + FilterName => sub { s[^$dir/][] } ; + } =item C<< Time => $number >> @@ -1360,7 +1356,7 @@ filename. This option controls the "external file attributes" field in the central header of the zip file. This is a 4 byte field. -If you are running a Unix derivative this value defaults to +If you are running a Unix derivative this value defaults to 0100644 << 16 @@ -1398,7 +1394,7 @@ and C<$gid>. These values correspond to the numeric User ID (UID) and Group ID When the C<exUnix2> option is present it will trigger the creation of a Unix2 extra field (ID is "Ux") in the local zip header. This will be populated with C<$uid> and C<$gid>. An empty Unix2 extra field will also -be created in the central zip header. +be created in the central zip header. Note - The UID & GID are stored as 16-bit integers in the "Ux" field. Use C<< exUnixN >> if your UID or GID are @@ -1415,8 +1411,8 @@ and C<$gid>. These values correspond to the numeric User ID (UID) and Group ID (GID) of the owner of the files respectively. When the C<exUnixN> option is present it will trigger the creation of a -UnixN extra field (ID is "ux") in both the local and central zip headers. -This will be populated with C<$uid> and C<$gid>. +UnixN extra field (ID is "ux") in both the local and central zip headers. +This will be populated with C<$uid> and C<$gid>. The UID & GID are stored as 32-bit integers. If the C<Minimal> option is set to true, this option will be ignored. @@ -1440,10 +1436,10 @@ By default, no comment field is written to the zip file. =item C<< Method => $method >> Controls which compression method is used. At present four compression -methods are supported, namely Store (no compression at all), Deflate, +methods are supported, namely Store (no compression at all), Deflate, Bzip2 and Lzma. -The symbols, ZIP_CM_STORE, ZIP_CM_DEFLATE, ZIP_CM_BZIP2 and ZIP_CM_LZMA +The symbols, ZIP_CM_STORE, ZIP_CM_DEFLATE, ZIP_CM_BZIP2 and ZIP_CM_LZMA are used to select the compression method. These constants are not imported by C<IO::Compress::Zip> by default. @@ -1476,17 +1472,17 @@ The default is 1. Create a Zip64 zip file/buffer. This option is used if you want to store files larger than 4 Gig or store more than 64K files in a single -zip archive.. +zip archive. -C<Zip64> will be automatically set, as needed, if working with the one-shot +C<Zip64> will be automatically set, as needed, if working with the one-shot interface when the input is either a filename or a scalar reference. If you intend to manipulate the Zip64 zip files created with this module -using an external zip/unzip, make sure that it supports Zip64. +using an external zip/unzip, make sure that it supports Zip64. In particular, if you are using Info-Zip you need to have zip version 3.x or better to update a Zip64 archive and unzip version 6.x to read a zip64 -archive. +archive. The default is 0. @@ -1499,7 +1495,7 @@ 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. +The default is 0. =item C<< ExtraFieldLocal => $data >> @@ -1529,7 +1525,7 @@ The list of subfields can be supplied in any of the following formats ... } -Where C<$id1>, C<$id2> are two byte subfield ID's. +Where C<$id1>, C<$id2> are two byte subfield ID's. If you use the hash syntax, you have no control over the order in which the ExtraSubFields are stored, plus you cannot have SubFields with @@ -1539,8 +1535,8 @@ Alternatively the list of subfields can by supplied as a scalar, thus ExtraField => $rawdata -In this case C<IO::Compress::Zip> will check that C<$rawdata> consists of -zero or more conformant sub-fields. +In this case C<IO::Compress::Zip> will check that C<$rawdata> consists of +zero or more conformant sub-fields. The Extended Time field (ID "UT"), set using the C<exTime> option, and the Unix2 extra field (ID "Ux), set using the C<exUnix2> option, are examples @@ -1554,14 +1550,14 @@ The maximum size of an extra field 65535 bytes. If specified, this option will disable the creation of all extra fields in the zip local and central headers. So the C<exTime>, C<exUnix2>, -C<exUnixN>, C<ExtraFieldLocal> and C<ExtraFieldCentral> options will +C<exUnixN>, C<ExtraFieldLocal> and C<ExtraFieldCentral> options will be ignored. This parameter defaults to 0. =item C<< BlockSize100K => number >> -Specify the number of 100K blocks bzip2 uses during compression. +Specify the number of 100K blocks bzip2 uses during compression. Valid values are from 1 to 9, where 9 is best compression. @@ -1608,7 +1604,7 @@ otherwise. Defaults to 0. -=item -Level +=item -Level Defines the compression level used by zlib. The value should either be a number between 0 and 9 (0 means no compression and 9 is maximum @@ -1627,7 +1623,7 @@ Note, these constants are not imported by C<IO::Compress::Zip> by default. use IO::Compress::Zip qw(:constants); use IO::Compress::Zip qw(:all); -=item -Strategy +=item -Strategy Defines the strategy used to tune the compression. Use one of the symbolic constants defined below. @@ -1650,7 +1646,7 @@ This is a placeholder option. TODO -=head1 Methods +=head1 Methods =head2 print @@ -1768,7 +1764,7 @@ This is a noop provided for completeness. $z->opened() -Returns true if the object currently refers to a opened file/buffer. +Returns true if the object currently refers to a opened file/buffer. =head2 autoflush @@ -1791,7 +1787,7 @@ retrieve the autoflush setting. $z->input_line_number() $z->input_line_number(EXPR) -This method always returns C<undef> when compressing. +This method always returns C<undef> when compressing. =head2 fileno @@ -1810,7 +1806,7 @@ C<undef>. $z->close() ; close $z ; -Flushes any pending compressed data and then closes the output file/buffer. +Flushes any pending compressed data and then closes the output file/buffer. For most versions of Perl this method will be automatically invoked if the IO::Compress::Zip object is destroyed (either explicitly or by the @@ -1851,9 +1847,9 @@ Usage is TODO -=head1 Importing +=head1 Importing -A number of symbolic constants are required by some methods in +A number of symbolic constants are required by some methods in C<IO::Compress::Zip>. None are imported by default. =over 5 @@ -1910,9 +1906,6 @@ constructor. ZIP_CM_DEFLATE ZIP_CM_BZIP2 - - - =back =head1 EXAMPLES @@ -1927,7 +1920,7 @@ See L<IO::Compress::FAQ|IO::Compress::FAQ/"Compressed files and Net::FTP"> =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> +L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -1935,7 +1928,7 @@ L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>, L<Archive::Tar|Archive::Tar>, L<IO::Zlib|IO::Zlib> -For RFC 1950, 1951 and 1952 see +For RFC 1950, 1951 and 1952 see L<http://www.faqs.org/rfcs/rfc1950.html>, L<http://www.faqs.org/rfcs/rfc1951.html> and L<http://www.faqs.org/rfcs/rfc1952.html> @@ -1950,7 +1943,7 @@ The primary site for gzip is L<http://www.gzip.org>. =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -1958,7 +1951,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zip/Constants.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zip/Constants.pm index 7e38f1b9aa..d28a6ae686 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zip/Constants.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zip/Constants.pm @@ -7,7 +7,7 @@ require Exporter; our ($VERSION, @ISA, @EXPORT, %ZIP_CM_MIN_VERSIONS); -$VERSION = '2.074'; +$VERSION = '2.084'; @ISA = qw(Exporter); diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zlib/Constants.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zlib/Constants.pm index 02d8d36517..d0d053be95 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zlib/Constants.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zlib/Constants.pm @@ -9,7 +9,7 @@ require Exporter; our ($VERSION, @ISA, @EXPORT); -$VERSION = '2.074'; +$VERSION = '2.084'; @ISA = qw(Exporter); diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zlib/Extra.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zlib/Extra.pm index f710309e7b..a88adba273 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zlib/Extra.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Compress/Zlib/Extra.pm @@ -8,9 +8,9 @@ use bytes; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS); -$VERSION = '2.074'; +$VERSION = '2.084'; -use IO::Compress::Gzip::Constants 2.074 ; +use IO::Compress::Gzip::Constants 2.084 ; sub ExtraFieldError { diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Dir.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Dir.pm index e583fd389a..e381880b44 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Dir.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Dir.pm @@ -18,7 +18,7 @@ use File::stat; use File::Spec; our @ISA = qw(Tie::Hash Exporter); -our $VERSION = "1.39"; +our $VERSION = "1.40"; our @EXPORT_OK = qw(DIR_UNLINK); diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/File.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/File.pm index 55c5e20d29..137ba54029 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/File.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/File.pm @@ -135,7 +135,7 @@ require Exporter; our @ISA = qw(IO::Handle IO::Seekable Exporter); -our $VERSION = "1.39"; +our $VERSION = "1.40"; our @EXPORT = @IO::Seekable::EXPORT; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Handle.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Handle.pm index 60750575c8..a257024645 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Handle.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Handle.pm @@ -270,7 +270,7 @@ use IO (); # Load the XS module require Exporter; our @ISA = qw(Exporter); -our $VERSION = "1.39"; +our $VERSION = "1.40"; our @EXPORT_OK = qw( autoflush diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Pipe.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Pipe.pm index f24220f11f..e314c88d0e 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Pipe.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Pipe.pm @@ -13,7 +13,7 @@ use strict; use Carp; use Symbol; -our $VERSION = "1.39"; +our $VERSION = "1.40"; sub new { my $type = shift; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Poll.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Poll.pm index 3e949b75f7..7aa1fb7514 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Poll.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Poll.pm @@ -12,7 +12,7 @@ use IO::Handle; use Exporter (); our @ISA = qw(Exporter); -our $VERSION = "1.39"; +our $VERSION = "1.40"; our @EXPORT = qw( POLLIN POLLOUT diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Seekable.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Seekable.pm index 27ed663445..48f6dbeaf8 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Seekable.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Seekable.pm @@ -106,7 +106,7 @@ require Exporter; our @EXPORT = qw(SEEK_SET SEEK_CUR SEEK_END); our @ISA = qw(Exporter); -our $VERSION = "1.39"; +our $VERSION = "1.40"; sub seek { @_ == 3 or croak 'usage: $io->seek(POS, WHENCE)'; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Select.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Select.pm index 6176f8bbf8..7d68feb7ab 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Select.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Select.pm @@ -10,7 +10,7 @@ use strict; use warnings::register; require Exporter; -our $VERSION = "1.39"; +our $VERSION = "1.40"; our @ISA = qw(Exporter); # This is only so we can do version checking diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Socket.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Socket.pm index bea16ec6e4..1bf57ab826 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Socket.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Socket.pm @@ -23,7 +23,7 @@ require IO::Socket::UNIX if ($^O ne 'epoc' && $^O ne 'symbian'); our @ISA = qw(IO::Handle); -our $VERSION = "1.39"; +our $VERSION = "1.40"; our @EXPORT_OK = qw(sockatmark); @@ -413,12 +413,12 @@ C<new> only looks for one key C<Domain> which tells new which domain the socket will be in. All other arguments will be passed to the configuration method of the package for that domain, See below. - NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE +B<NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE> As of VERSION 1.18 all IO::Socket objects have autoflush turned on by default. This was not the case with earlier releases. - NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE +B<NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE> =back diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Socket/INET.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Socket/INET.pm index 084cb1c631..8b4373f261 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Socket/INET.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Socket/INET.pm @@ -14,7 +14,7 @@ use Exporter; use Errno; our @ISA = qw(IO::Socket); -our $VERSION = "1.39"; +our $VERSION = "1.40"; my $EINVAL = exists(&Errno::EINVAL) ? Errno::EINVAL() : 1; @@ -406,12 +406,12 @@ Examples: Broadcast => 1 ) or die "Can't bind : $@\n"; - NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE +B<NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE> As of VERSION 1.18 all IO::Socket objects have autoflush turned on by default. This was not the case with earlier releases. - NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE +B<NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE> =back diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Socket/UNIX.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Socket/UNIX.pm index a46dd593d6..ff38af0f63 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Socket/UNIX.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Socket/UNIX.pm @@ -11,7 +11,7 @@ use IO::Socket; use Carp; our @ISA = qw(IO::Socket); -our $VERSION = "1.39"; +our $VERSION = "1.40"; IO::Socket::UNIX->register_domain( AF_UNIX ); diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Adapter/Bunzip2.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Adapter/Bunzip2.pm index 2bd5e24236..1aa9a8c39b 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Adapter/Bunzip2.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Adapter/Bunzip2.pm @@ -4,12 +4,12 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.074 qw(:Status); +use IO::Compress::Base::Common 2.084 qw(:Status); -use Compress::Raw::Bzip2 2.074 ; +use Compress::Raw::Bzip2 2.084 ; our ($VERSION, @ISA); -$VERSION = '2.074'; +$VERSION = '2.084'; sub mkUncompObject { diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Adapter/Identity.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Adapter/Identity.pm index 3327fbc4bc..5601599225 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Adapter/Identity.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Adapter/Identity.pm @@ -4,14 +4,14 @@ use warnings; use strict; use bytes; -use IO::Compress::Base::Common 2.074 qw(:Status); +use IO::Compress::Base::Common 2.084 qw(:Status); use IO::Compress::Zip::Constants ; our ($VERSION); -$VERSION = '2.074'; +$VERSION = '2.084'; -use Compress::Raw::Zlib 2.074 (); +use Compress::Raw::Zlib 2.084 (); sub mkUncompObject { diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Adapter/Inflate.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Adapter/Inflate.pm index 256d8409dd..f51c64d7e5 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Adapter/Inflate.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Adapter/Inflate.pm @@ -4,11 +4,11 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.074 qw(:Status); -use Compress::Raw::Zlib 2.074 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS); +use IO::Compress::Base::Common 2.084 qw(:Status); +use Compress::Raw::Zlib 2.084 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS); our ($VERSION); -$VERSION = '2.074'; +$VERSION = '2.084'; @@ -62,7 +62,6 @@ sub uncompr my $status = $inf->inflate($from, $to, $eof); $self->{ErrorNo} = $status; - if ($status != Z_OK && $status != Z_STREAM_END && $status != Z_BUF_ERROR) { $self->{Error} = "Inflation Error: $status"; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/AnyInflate.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/AnyInflate.pm index 40264960fd..be464889eb 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/AnyInflate.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/AnyInflate.pm @@ -6,22 +6,22 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.074 (); +use IO::Compress::Base::Common 2.084 (); -use IO::Uncompress::Adapter::Inflate 2.074 (); +use IO::Uncompress::Adapter::Inflate 2.084 (); -use IO::Uncompress::Base 2.074 ; -use IO::Uncompress::Gunzip 2.074 ; -use IO::Uncompress::Inflate 2.074 ; -use IO::Uncompress::RawInflate 2.074 ; -use IO::Uncompress::Unzip 2.074 ; +use IO::Uncompress::Base 2.084 ; +use IO::Uncompress::Gunzip 2.084 ; +use IO::Uncompress::Inflate 2.084 ; +use IO::Uncompress::RawInflate 2.084 ; +use IO::Uncompress::Unzip 2.084 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyInflateError); -$VERSION = '2.074'; +$VERSION = '2.084'; $AnyInflateError = ''; @ISA = qw(IO::Uncompress::Base Exporter); @@ -48,7 +48,7 @@ sub anyinflate sub getExtraParams { - use IO::Compress::Base::Common 2.074 qw(:Parse); + use IO::Compress::Base::Common 2.084 qw(:Parse); return ( 'rawinflate' => [Parse_boolean, 0] ) ; } @@ -135,7 +135,7 @@ IO::Uncompress::AnyInflate - Uncompress zlib-based (zip, gzip) file/buffer my $status = anyinflate $input => $output [,OPTS] or die "anyinflate failed: $AnyInflateError\n"; - my $z = new IO::Uncompress::AnyInflate $input [OPTS] + my $z = new IO::Uncompress::AnyInflate $input [OPTS] or die "anyinflate failed: $AnyInflateError\n"; $status = $z->read($buffer) @@ -205,7 +205,7 @@ section. use IO::Uncompress::AnyInflate qw(anyinflate $AnyInflateError) ; - anyinflate $input_filename_or_reference => $output_filename_or_reference [,OPTS] + anyinflate $input_filename_or_reference => $output_filename_or_reference [,OPTS] or die "anyinflate failed: $AnyInflateError\n"; The functional interface needs Perl5.005 or better. @@ -218,7 +218,7 @@ C<$input_filename_or_reference> and C<$output_filename_or_reference>. =head3 The C<$input_filename_or_reference> parameter The parameter, C<$input_filename_or_reference>, is used to define the -source of the compressed data. +source of the compressed data. It can take one of the following forms: @@ -236,17 +236,17 @@ If the C<$input_filename_or_reference> parameter is a filehandle, the input data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input_filename_or_reference> is a scalar reference, the input data will be read from C<$$input_filename_or_reference>. -=item An array reference +=item An array reference If C<$input_filename_or_reference> is an array reference, each element in the array must be a filename. -The input data will be read from each file in turn. +The input data will be read from each file in turn. The complete array will be walked to ensure that it only contains valid filenames before any data is uncompressed. @@ -254,8 +254,8 @@ contains valid filenames before any data is uncompressed. =item An Input FileGlob string If C<$input_filename_or_reference> is a string that is delimited by the -characters "<" and ">" C<anyinflate> will assume that it is an -I<input fileglob string>. The input is the list of files that match the +characters "<" and ">" C<anyinflate> will assume that it is an +I<input fileglob string>. The input is the list of files that match the fileglob. See L<File::GlobMapper|File::GlobMapper> for more details. @@ -276,7 +276,7 @@ these forms. =item A filename If the C<$output_filename_or_reference> parameter is a simple scalar, it is -assumed to be a filename. This file will be opened for writing and the +assumed to be a filename. This file will be opened for writing and the uncompressed data will be written to it. =item A filehandle @@ -285,14 +285,14 @@ If the C<$output_filename_or_reference> parameter is a filehandle, the uncompressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output_filename_or_reference> is a scalar reference, the uncompressed data will be stored in C<$$output_filename_or_reference>. =item An Array Reference -If C<$output_filename_or_reference> is an array reference, +If C<$output_filename_or_reference> is an array reference, the uncompressed data will be pushed onto the array. =item An Output FileGlob @@ -331,7 +331,7 @@ L</"Constructor Options"> section below. =item C<< AutoClose => 0|1 >> -This option applies to any input or output data streams to +This option applies to any input or output data streams to C<anyinflate> that are filehandles. If C<AutoClose> is specified, and the value is true, it will result in all @@ -342,10 +342,7 @@ This parameter defaults to 0. =item C<< BinModeOut => 0|1 >> -When writing to a file or filehandle, set C<binmode> before writing to the -file. - -Defaults to 0. +This option is now a no-op. All files will be written in binmode. =item C<< Append => 0|1 >> @@ -374,7 +371,7 @@ written to it. Otherwise the file pointer will not be moved. =back -When C<Append> is specified, and set to true, it will I<append> all uncompressed +When C<Append> is specified, and set to true, it will I<append> all uncompressed data to the output data stream. So when the output is a filehandle it will carry out a seek to the eof @@ -402,7 +399,7 @@ Defaults to 0. =item C<< TrailingData => $scalar >> Returns the data, if any, that is present immediately after the compressed -data stream once uncompression is complete. +data stream once uncompression is complete. This option can be used when there is useful information immediately following the compressed data stream, and you don't know the length of the @@ -414,7 +411,7 @@ end of the compressed data stream to the end of the buffer. If the input is a filehandle, C<trailingData> will return the data that is left in the filehandle input buffer once the end of the compressed data stream has been reached. You can then use the filehandle to read the rest -of the input file. +of the input file. Don't bother using C<trailingData> if the input is a filename. @@ -449,7 +446,7 @@ uncompressed data to a buffer, C<$buffer>. my $input = new IO::File "<file1.txt.Compressed" or die "Cannot open 'file1.txt.Compressed': $!\n" ; my $buffer ; - anyinflate $input => \$buffer + anyinflate $input => \$buffer or die "anyinflate failed: $AnyInflateError\n"; To uncompress all files in the directory "/my/home" that match "*.txt.Compressed" and store the compressed data in the same directory @@ -471,7 +468,7 @@ and if you want to compress each file one at a time, this will do the trick { my $output = $input; $output =~ s/.Compressed// ; - anyinflate $input => $output + anyinflate $input => $output or die "Error compressing '$input': $AnyInflateError\n"; } @@ -512,7 +509,7 @@ If the C<$input> parameter is a filehandle, the compressed data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input> is a scalar reference, the compressed data will be read from C<$$input>. @@ -587,7 +584,7 @@ When present this option will limit the number of compressed bytes read from the input file/buffer to C<$size>. This option can be used in the situation where there is useful data directly after the compressed data stream and you know beforehand the exact length of the compressed data -stream. +stream. This option is mostly used when reading from a filehandle, in which case the file pointer will be left pointing to the first byte directly after the @@ -634,7 +631,7 @@ If the input is a gzip (RFC 1952) data stream, the following will be checked: =over 5 -=item 1 +=item 1 If the FHCRC bit is set in the gzip FLG header byte, the CRC16 bytes in the header must match the crc16 value of the gzip header actually read. @@ -673,7 +670,7 @@ uncompressed data actually read from the file. =item C<< RawInflate => 0|1 >> When auto-detecting the compressed format, try to test for raw-deflate (RFC -1951) content using the C<IO::Uncompress::RawInflate> module. +1951) content using the C<IO::Uncompress::RawInflate> module. The reason this is not default behaviour is because RFC 1951 content can only be detected by attempting to uncompress it. This process is error @@ -696,7 +693,7 @@ Defaults to 0. TODO -=head1 Methods +=head1 Methods =head2 read @@ -740,16 +737,16 @@ Usage is $line = $z->getline() $line = <$z> -Reads a single line. +Reads a single line. This method fully supports the use of the variable C<$/> (or C<$INPUT_RECORD_SEPARATOR> or C<$RS> when C<English> is in use) to determine what constitutes an end of line. Paragraph mode, record mode and -file slurp mode are all supported. +file slurp mode are all supported. =head2 getc -Usage is +Usage is $char = $z->getc() @@ -832,7 +829,7 @@ This is a noop provided for completeness. $z->opened() -Returns true if the object currently refers to a opened file/buffer. +Returns true if the object currently refers to a opened file/buffer. =head2 autoflush @@ -879,7 +876,7 @@ C<undef>. $z->close() ; close $z ; -Closes the output file/buffer. +Closes the output file/buffer. For most versions of Perl this method will be automatically invoked if the IO::Uncompress::AnyInflate object is destroyed (either explicitly or by the @@ -933,7 +930,7 @@ end of the compressed data stream to the end of the buffer. If the input is a filehandle, C<trailingData> will return the data that is left in the filehandle input buffer once the end of the compressed data stream has been reached. You can then use the filehandle to read the rest -of the input file. +of the input file. Don't bother using C<trailingData> if the input is a filename. @@ -941,9 +938,9 @@ If you know the length of the compressed data stream before you start uncompressing, you can avoid having to use C<trailingData> by setting the C<InputLength> option in the constructor. -=head1 Importing +=head1 Importing -No symbolic constants are required by this IO::Uncompress::AnyInflate at present. +No symbolic constants are required by this IO::Uncompress::AnyInflate at present. =over 5 @@ -964,7 +961,7 @@ See L<IO::Compress::FAQ|IO::Compress::FAQ/"Compressed files and Net::FTP"> =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyUncompress> +L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyUncompress> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -972,7 +969,7 @@ L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>, L<Archive::Tar|Archive::Tar>, L<IO::Zlib|IO::Zlib> -For RFC 1950, 1951 and 1952 see +For RFC 1950, 1951 and 1952 see L<http://www.faqs.org/rfcs/rfc1950.html>, L<http://www.faqs.org/rfcs/rfc1951.html> and L<http://www.faqs.org/rfcs/rfc1952.html> @@ -987,7 +984,7 @@ The primary site for gzip is L<http://www.gzip.org>. =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -995,7 +992,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/AnyUncompress.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/AnyUncompress.pm index e149a129ac..c6dfce536b 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/AnyUncompress.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/AnyUncompress.pm @@ -4,16 +4,16 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.074 (); +use IO::Compress::Base::Common 2.084 (); -use IO::Uncompress::Base 2.074 ; +use IO::Uncompress::Base 2.084 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyUncompressError); -$VERSION = '2.074'; +$VERSION = '2.084'; $AnyUncompressError = ''; @ISA = qw(IO::Uncompress::Base Exporter); @@ -29,22 +29,27 @@ BEGIN { local @INC = @INC; pop @INC if $INC[-1] eq '.'; - eval ' use IO::Uncompress::Adapter::Inflate 2.074 ;'; - eval ' use IO::Uncompress::Adapter::Bunzip2 2.074 ;'; - eval ' use IO::Uncompress::Adapter::LZO 2.074 ;'; - eval ' use IO::Uncompress::Adapter::Lzf 2.074 ;'; - eval ' use IO::Uncompress::Adapter::UnLzma 2.074 ;'; - eval ' use IO::Uncompress::Adapter::UnXz 2.074 ;'; - - eval ' use IO::Uncompress::Bunzip2 2.074 ;'; - eval ' use IO::Uncompress::UnLzop 2.074 ;'; - eval ' use IO::Uncompress::Gunzip 2.074 ;'; - eval ' use IO::Uncompress::Inflate 2.074 ;'; - eval ' use IO::Uncompress::RawInflate 2.074 ;'; - eval ' use IO::Uncompress::Unzip 2.074 ;'; - eval ' use IO::Uncompress::UnLzf 2.074 ;'; - eval ' use IO::Uncompress::UnLzma 2.074 ;'; - eval ' use IO::Uncompress::UnXz 2.074 ;'; + eval ' use IO::Uncompress::Adapter::Inflate 2.084 ;'; + eval ' use IO::Uncompress::Adapter::Bunzip2 2.084 ;'; + eval ' use IO::Uncompress::Adapter::LZO 2.084 ;'; + eval ' use IO::Uncompress::Adapter::Lzf 2.084 ;'; + eval ' use IO::Uncompress::Adapter::UnLzma 2.084 ;'; + eval ' use IO::Uncompress::Adapter::UnXz 2.084 ;'; + eval ' use IO::Uncompress::Adapter::UnZstd 2.083 ;'; + eval ' use IO::Uncompress::Adapter::UnLzip 2.084 ;'; + + eval ' use IO::Uncompress::Bunzip2 2.084 ;'; + eval ' use IO::Uncompress::UnLzop 2.084 ;'; + eval ' use IO::Uncompress::Gunzip 2.084 ;'; + eval ' use IO::Uncompress::Inflate 2.084 ;'; + eval ' use IO::Uncompress::RawInflate 2.084 ;'; + eval ' use IO::Uncompress::Unzip 2.084 ;'; + eval ' use IO::Uncompress::UnLzf 2.084 ;'; + eval ' use IO::Uncompress::UnLzma 2.084 ;'; + eval ' use IO::Uncompress::UnXz 2.084 ;'; + eval ' use IO::Uncompress::UnZstd 2.084 ;'; + eval ' use IO::Uncompress::UnLzip 2.084 ;'; + } sub new @@ -191,6 +196,39 @@ sub mkUncomp return 1; } + if (defined $IO::Uncompress::UnZstd::VERSION and + $magic = $self->ckMagic('UnZstd')) { + + *$self->{Info} = $self->readHeader($magic) + or return undef ; + + my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::Zstd::mkUncompObject(); + + return $self->saveErrorString(undef, $errstr, $errno) + if ! defined $obj; + + *$self->{Uncomp} = $obj; + + return 1; + } + + + if (defined $IO::Uncompress::UnLzip::VERSION and + $magic = $self->ckMagic('UnLzip')) { + + *$self->{Info} = $self->readHeader($magic) + or return undef ; + + my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::UnLzip::mkUncompObject(*$self->{Info}{DictSize}); + + return $self->saveErrorString(undef, $errstr, $errno) + if ! defined $obj; + + *$self->{Uncomp} = $obj; + + return 1; + } + return 0 ; } @@ -237,7 +275,7 @@ IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2 or lzop file/buffer my $status = anyuncompress $input => $output [,OPTS] or die "anyuncompress failed: $AnyUncompressError\n"; - my $z = new IO::Uncompress::AnyUncompress $input [OPTS] + my $z = new IO::Uncompress::AnyUncompress $input [OPTS] or die "anyuncompress failed: $AnyUncompressError\n"; $status = $z->read($buffer) @@ -299,6 +337,8 @@ The formats supported are: =item lzma +=item lzip + =item xz =back @@ -315,7 +355,7 @@ section. use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ; - anyuncompress $input_filename_or_reference => $output_filename_or_reference [,OPTS] + anyuncompress $input_filename_or_reference => $output_filename_or_reference [,OPTS] or die "anyuncompress failed: $AnyUncompressError\n"; The functional interface needs Perl5.005 or better. @@ -328,7 +368,7 @@ C<$input_filename_or_reference> and C<$output_filename_or_reference>. =head3 The C<$input_filename_or_reference> parameter The parameter, C<$input_filename_or_reference>, is used to define the -source of the compressed data. +source of the compressed data. It can take one of the following forms: @@ -346,17 +386,17 @@ If the C<$input_filename_or_reference> parameter is a filehandle, the input data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input_filename_or_reference> is a scalar reference, the input data will be read from C<$$input_filename_or_reference>. -=item An array reference +=item An array reference If C<$input_filename_or_reference> is an array reference, each element in the array must be a filename. -The input data will be read from each file in turn. +The input data will be read from each file in turn. The complete array will be walked to ensure that it only contains valid filenames before any data is uncompressed. @@ -364,8 +404,8 @@ contains valid filenames before any data is uncompressed. =item An Input FileGlob string If C<$input_filename_or_reference> is a string that is delimited by the -characters "<" and ">" C<anyuncompress> will assume that it is an -I<input fileglob string>. The input is the list of files that match the +characters "<" and ">" C<anyuncompress> will assume that it is an +I<input fileglob string>. The input is the list of files that match the fileglob. See L<File::GlobMapper|File::GlobMapper> for more details. @@ -386,7 +426,7 @@ these forms. =item A filename If the C<$output_filename_or_reference> parameter is a simple scalar, it is -assumed to be a filename. This file will be opened for writing and the +assumed to be a filename. This file will be opened for writing and the uncompressed data will be written to it. =item A filehandle @@ -395,14 +435,14 @@ If the C<$output_filename_or_reference> parameter is a filehandle, the uncompressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output_filename_or_reference> is a scalar reference, the uncompressed data will be stored in C<$$output_filename_or_reference>. =item An Array Reference -If C<$output_filename_or_reference> is an array reference, +If C<$output_filename_or_reference> is an array reference, the uncompressed data will be pushed onto the array. =item An Output FileGlob @@ -441,7 +481,7 @@ L</"Constructor Options"> section below. =item C<< AutoClose => 0|1 >> -This option applies to any input or output data streams to +This option applies to any input or output data streams to C<anyuncompress> that are filehandles. If C<AutoClose> is specified, and the value is true, it will result in all @@ -452,10 +492,7 @@ This parameter defaults to 0. =item C<< BinModeOut => 0|1 >> -When writing to a file or filehandle, set C<binmode> before writing to the -file. - -Defaults to 0. +This option is now a no-op. All files will be written in binmode. =item C<< Append => 0|1 >> @@ -484,7 +521,7 @@ written to it. Otherwise the file pointer will not be moved. =back -When C<Append> is specified, and set to true, it will I<append> all uncompressed +When C<Append> is specified, and set to true, it will I<append> all uncompressed data to the output data stream. So when the output is a filehandle it will carry out a seek to the eof @@ -512,7 +549,7 @@ Defaults to 0. =item C<< TrailingData => $scalar >> Returns the data, if any, that is present immediately after the compressed -data stream once uncompression is complete. +data stream once uncompression is complete. This option can be used when there is useful information immediately following the compressed data stream, and you don't know the length of the @@ -524,7 +561,7 @@ end of the compressed data stream to the end of the buffer. If the input is a filehandle, C<trailingData> will return the data that is left in the filehandle input buffer once the end of the compressed data stream has been reached. You can then use the filehandle to read the rest -of the input file. +of the input file. Don't bother using C<trailingData> if the input is a filename. @@ -559,7 +596,7 @@ uncompressed data to a buffer, C<$buffer>. my $input = new IO::File "<file1.txt.Compressed" or die "Cannot open 'file1.txt.Compressed': $!\n" ; my $buffer ; - anyuncompress $input => \$buffer + anyuncompress $input => \$buffer or die "anyuncompress failed: $AnyUncompressError\n"; To uncompress all files in the directory "/my/home" that match "*.txt.Compressed" and store the compressed data in the same directory @@ -581,7 +618,7 @@ and if you want to compress each file one at a time, this will do the trick { my $output = $input; $output =~ s/.Compressed// ; - anyuncompress $input => $output + anyuncompress $input => $output or die "Error compressing '$input': $AnyUncompressError\n"; } @@ -622,7 +659,7 @@ If the C<$input> parameter is a filehandle, the compressed data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input> is a scalar reference, the compressed data will be read from C<$$input>. @@ -697,7 +734,7 @@ When present this option will limit the number of compressed bytes read from the input file/buffer to C<$size>. This option can be used in the situation where there is useful data directly after the compressed data stream and you know beforehand the exact length of the compressed data -stream. +stream. This option is mostly used when reading from a filehandle, in which case the file pointer will be left pointing to the first byte directly after the @@ -728,7 +765,7 @@ The default for this option is off. =item C<< RawInflate => 0|1 >> When auto-detecting the compressed format, try to test for raw-deflate (RFC -1951) content using the C<IO::Uncompress::RawInflate> module. +1951) content using the C<IO::Uncompress::RawInflate> module. The reason this is not default behaviour is because RFC 1951 content can only be detected by attempting to uncompress it. This process is error @@ -739,7 +776,7 @@ Defaults to 0. =item C<< UnLzma => 0|1 >> When auto-detecting the compressed format, try to test for lzma_alone -content using the C<IO::Uncompress::UnLzma> module. +content using the C<IO::Uncompress::UnLzma> module. The reason this is not default behaviour is because lzma_alone content can only be detected by attempting to uncompress it. This process is error @@ -753,7 +790,7 @@ Defaults to 0. TODO -=head1 Methods +=head1 Methods =head2 read @@ -797,16 +834,16 @@ Usage is $line = $z->getline() $line = <$z> -Reads a single line. +Reads a single line. This method fully supports the use of the variable C<$/> (or C<$INPUT_RECORD_SEPARATOR> or C<$RS> when C<English> is in use) to determine what constitutes an end of line. Paragraph mode, record mode and -file slurp mode are all supported. +file slurp mode are all supported. =head2 getc -Usage is +Usage is $char = $z->getc() @@ -881,7 +918,7 @@ This is a noop provided for completeness. $z->opened() -Returns true if the object currently refers to a opened file/buffer. +Returns true if the object currently refers to a opened file/buffer. =head2 autoflush @@ -928,7 +965,7 @@ C<undef>. $z->close() ; close $z ; -Closes the output file/buffer. +Closes the output file/buffer. For most versions of Perl this method will be automatically invoked if the IO::Uncompress::AnyUncompress object is destroyed (either explicitly or by the @@ -982,7 +1019,7 @@ end of the compressed data stream to the end of the buffer. If the input is a filehandle, C<trailingData> will return the data that is left in the filehandle input buffer once the end of the compressed data stream has been reached. You can then use the filehandle to read the rest -of the input file. +of the input file. Don't bother using C<trailingData> if the input is a filename. @@ -990,9 +1027,9 @@ If you know the length of the compressed data stream before you start uncompressing, you can avoid having to use C<trailingData> by setting the C<InputLength> option in the constructor. -=head1 Importing +=head1 Importing -No symbolic constants are required by this IO::Uncompress::AnyUncompress at present. +No symbolic constants are required by this IO::Uncompress::AnyUncompress at present. =over 5 @@ -1009,7 +1046,7 @@ Same as doing this =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate> +L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -1019,7 +1056,7 @@ L<IO::Zlib|IO::Zlib> =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -1027,7 +1064,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Base.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Base.pm index 4ba3efab16..06fb04a81c 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Base.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Base.pm @@ -9,12 +9,12 @@ our (@ISA, $VERSION, @EXPORT_OK, %EXPORT_TAGS); @ISA = qw(IO::File Exporter); -$VERSION = '2.074'; +$VERSION = '2.084'; use constant G_EOF => 0 ; use constant G_ERR => -1 ; -use IO::Compress::Base::Common 2.074 ; +use IO::Compress::Base::Common 2.084 ; use IO::File ; use Symbol; @@ -143,11 +143,12 @@ sub smartSeek my $position = shift || SEEK_SET; # TODO -- need to take prime into account + *$self->{Prime} = ''; if (defined *$self->{FH}) { *$self->{FH}->seek($offset, $position) } else { if ($position == SEEK_END) { - *$self->{BufferOffset} = length ${ *$self->{Buffer} } + $offset ; + *$self->{BufferOffset} = length(${ *$self->{Buffer} }) + $offset ; } elsif ($position == SEEK_CUR) { *$self->{BufferOffset} += $offset ; @@ -493,6 +494,9 @@ sub _create *$obj->{InNew} = 0; *$obj->{Closed} = 0; + + return $obj + if *$obj->{Pause} ; if ($status) { # Need to try uncompressing to catch the case @@ -691,13 +695,13 @@ sub _singleTarget if $x->{Got}->getValue('append') ; $x->{fh} = new IO::File "$mode $output" or return retErr($x, "cannot open file '$output': $!") ; - binmode $x->{fh} if $x->{Got}->valueOrDefault('binmodeout'); + binmode $x->{fh} ; } elsif ($x->{outType} eq 'handle') { $x->{fh} = $output; - binmode $x->{fh} if $x->{Got}->valueOrDefault('binmodeout'); + binmode $x->{fh} ; if ($x->{Got}->getValue('append')) { seek($x->{fh}, 0, SEEK_END) or return retErr($x, "Cannot seek to end of output filehandle: $!") ; @@ -1073,13 +1077,6 @@ sub streamCount return scalar @{ *$self->{InfoList} } ; } -#sub read -#{ -# my $status = myRead(@_); -# return undef if $status < 0; -# return $status; -#} - sub read { # return codes @@ -1120,6 +1117,7 @@ sub read if (! *$self->{AppendOutput}) { if (! $offset) { + $$buffer = '' ; } else { @@ -1518,7 +1516,7 @@ __END__ =head1 NAME -IO::Uncompress::Base - Base Class for IO::Uncompress modules +IO::Uncompress::Base - Base Class for IO::Uncompress modules =head1 SYNOPSIS @@ -1531,7 +1529,7 @@ purpose is to be sub-classed by IO::Uncompress modules. =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> +L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -1541,7 +1539,7 @@ L<IO::Zlib|IO::Zlib> =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -1549,7 +1547,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Bunzip2.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Bunzip2.pm index 26556b7625..7a84bcd15c 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Bunzip2.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Bunzip2.pm @@ -4,15 +4,15 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base::Common 2.074 qw(:Status ); +use IO::Compress::Base::Common 2.084 qw(:Status ); -use IO::Uncompress::Base 2.074 ; -use IO::Uncompress::Adapter::Bunzip2 2.074 ; +use IO::Uncompress::Base 2.084 ; +use IO::Uncompress::Adapter::Bunzip2 2.084 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bunzip2Error); -$VERSION = '2.074'; +$VERSION = '2.084'; $Bunzip2Error = ''; @ISA = qw(IO::Uncompress::Base Exporter); @@ -149,7 +149,7 @@ IO::Uncompress::Bunzip2 - Read bzip2 files/buffers my $status = bunzip2 $input => $output [,OPTS] or die "bunzip2 failed: $Bunzip2Error\n"; - my $z = new IO::Uncompress::Bunzip2 $input [OPTS] + my $z = new IO::Uncompress::Bunzip2 $input [OPTS] or die "bunzip2 failed: $Bunzip2Error\n"; $status = $z->read($buffer) @@ -201,7 +201,7 @@ section. use IO::Uncompress::Bunzip2 qw(bunzip2 $Bunzip2Error) ; - bunzip2 $input_filename_or_reference => $output_filename_or_reference [,OPTS] + bunzip2 $input_filename_or_reference => $output_filename_or_reference [,OPTS] or die "bunzip2 failed: $Bunzip2Error\n"; The functional interface needs Perl5.005 or better. @@ -214,7 +214,7 @@ C<$input_filename_or_reference> and C<$output_filename_or_reference>. =head3 The C<$input_filename_or_reference> parameter The parameter, C<$input_filename_or_reference>, is used to define the -source of the compressed data. +source of the compressed data. It can take one of the following forms: @@ -232,17 +232,17 @@ If the C<$input_filename_or_reference> parameter is a filehandle, the input data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input_filename_or_reference> is a scalar reference, the input data will be read from C<$$input_filename_or_reference>. -=item An array reference +=item An array reference If C<$input_filename_or_reference> is an array reference, each element in the array must be a filename. -The input data will be read from each file in turn. +The input data will be read from each file in turn. The complete array will be walked to ensure that it only contains valid filenames before any data is uncompressed. @@ -250,8 +250,8 @@ contains valid filenames before any data is uncompressed. =item An Input FileGlob string If C<$input_filename_or_reference> is a string that is delimited by the -characters "<" and ">" C<bunzip2> will assume that it is an -I<input fileglob string>. The input is the list of files that match the +characters "<" and ">" C<bunzip2> will assume that it is an +I<input fileglob string>. The input is the list of files that match the fileglob. See L<File::GlobMapper|File::GlobMapper> for more details. @@ -272,7 +272,7 @@ these forms. =item A filename If the C<$output_filename_or_reference> parameter is a simple scalar, it is -assumed to be a filename. This file will be opened for writing and the +assumed to be a filename. This file will be opened for writing and the uncompressed data will be written to it. =item A filehandle @@ -281,14 +281,14 @@ If the C<$output_filename_or_reference> parameter is a filehandle, the uncompressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output_filename_or_reference> is a scalar reference, the uncompressed data will be stored in C<$$output_filename_or_reference>. =item An Array Reference -If C<$output_filename_or_reference> is an array reference, +If C<$output_filename_or_reference> is an array reference, the uncompressed data will be pushed onto the array. =item An Output FileGlob @@ -327,7 +327,7 @@ L</"Constructor Options"> section below. =item C<< AutoClose => 0|1 >> -This option applies to any input or output data streams to +This option applies to any input or output data streams to C<bunzip2> that are filehandles. If C<AutoClose> is specified, and the value is true, it will result in all @@ -338,10 +338,7 @@ This parameter defaults to 0. =item C<< BinModeOut => 0|1 >> -When writing to a file or filehandle, set C<binmode> before writing to the -file. - -Defaults to 0. +This option is now a no-op. All files will be written in binmode. =item C<< Append => 0|1 >> @@ -370,7 +367,7 @@ written to it. Otherwise the file pointer will not be moved. =back -When C<Append> is specified, and set to true, it will I<append> all uncompressed +When C<Append> is specified, and set to true, it will I<append> all uncompressed data to the output data stream. So when the output is a filehandle it will carry out a seek to the eof @@ -398,7 +395,7 @@ Defaults to 0. =item C<< TrailingData => $scalar >> Returns the data, if any, that is present immediately after the compressed -data stream once uncompression is complete. +data stream once uncompression is complete. This option can be used when there is useful information immediately following the compressed data stream, and you don't know the length of the @@ -410,7 +407,7 @@ end of the compressed data stream to the end of the buffer. If the input is a filehandle, C<trailingData> will return the data that is left in the filehandle input buffer once the end of the compressed data stream has been reached. You can then use the filehandle to read the rest -of the input file. +of the input file. Don't bother using C<trailingData> if the input is a filename. @@ -445,7 +442,7 @@ uncompressed data to a buffer, C<$buffer>. my $input = new IO::File "<file1.txt.bz2" or die "Cannot open 'file1.txt.bz2': $!\n" ; my $buffer ; - bunzip2 $input => \$buffer + bunzip2 $input => \$buffer or die "bunzip2 failed: $Bunzip2Error\n"; To uncompress all files in the directory "/my/home" that match "*.txt.bz2" and store the compressed data in the same directory @@ -467,7 +464,7 @@ and if you want to compress each file one at a time, this will do the trick { my $output = $input; $output =~ s/.bz2// ; - bunzip2 $input => $output + bunzip2 $input => $output or die "Error compressing '$input': $Bunzip2Error\n"; } @@ -508,7 +505,7 @@ If the C<$input> parameter is a filehandle, the compressed data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input> is a scalar reference, the compressed data will be read from C<$$input>. @@ -583,7 +580,7 @@ When present this option will limit the number of compressed bytes read from the input file/buffer to C<$size>. This option can be used in the situation where there is useful data directly after the compressed data stream and you know beforehand the exact length of the compressed data -stream. +stream. This option is mostly used when reading from a filehandle, in which case the file pointer will be left pointing to the first byte directly after the @@ -611,7 +608,7 @@ This option is a no-op. When non-zero this options will make bzip2 use a decompression algorithm that uses less memory at the expense of increasing the amount of time -taken for decompression. +taken for decompression. Default is 0. @@ -621,7 +618,7 @@ Default is 0. TODO -=head1 Methods +=head1 Methods =head2 read @@ -665,16 +662,16 @@ Usage is $line = $z->getline() $line = <$z> -Reads a single line. +Reads a single line. This method fully supports the use of the variable C<$/> (or C<$INPUT_RECORD_SEPARATOR> or C<$RS> when C<English> is in use) to determine what constitutes an end of line. Paragraph mode, record mode and -file slurp mode are all supported. +file slurp mode are all supported. =head2 getc -Usage is +Usage is $char = $z->getc() @@ -749,7 +746,7 @@ This is a noop provided for completeness. $z->opened() -Returns true if the object currently refers to a opened file/buffer. +Returns true if the object currently refers to a opened file/buffer. =head2 autoflush @@ -796,7 +793,7 @@ C<undef>. $z->close() ; close $z ; -Closes the output file/buffer. +Closes the output file/buffer. For most versions of Perl this method will be automatically invoked if the IO::Uncompress::Bunzip2 object is destroyed (either explicitly or by the @@ -850,7 +847,7 @@ end of the compressed data stream to the end of the buffer. If the input is a filehandle, C<trailingData> will return the data that is left in the filehandle input buffer once the end of the compressed data stream has been reached. You can then use the filehandle to read the rest -of the input file. +of the input file. Don't bother using C<trailingData> if the input is a filename. @@ -858,9 +855,9 @@ If you know the length of the compressed data stream before you start uncompressing, you can avoid having to use C<trailingData> by setting the C<InputLength> option in the constructor. -=head1 Importing +=head1 Importing -No symbolic constants are required by this IO::Uncompress::Bunzip2 at present. +No symbolic constants are required by this IO::Uncompress::Bunzip2 at present. =over 5 @@ -881,7 +878,7 @@ See L<IO::Compress::FAQ|IO::Compress::FAQ/"Compressed files and Net::FTP"> =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> +L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -895,7 +892,7 @@ See the module L<Compress::Bzip2|Compress::Bzip2> =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -903,7 +900,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Gunzip.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Gunzip.pm index 90af4b1b62..46dd108341 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Gunzip.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Gunzip.pm @@ -9,12 +9,12 @@ use strict ; use warnings; use bytes; -use IO::Uncompress::RawInflate 2.074 ; +use IO::Uncompress::RawInflate 2.084 ; -use Compress::Raw::Zlib 2.074 () ; -use IO::Compress::Base::Common 2.074 qw(:Status ); -use IO::Compress::Gzip::Constants 2.074 ; -use IO::Compress::Zlib::Extra 2.074 ; +use Compress::Raw::Zlib 2.084 () ; +use IO::Compress::Base::Common 2.084 qw(:Status ); +use IO::Compress::Gzip::Constants 2.084 ; +use IO::Compress::Zlib::Extra 2.084 ; require Exporter ; @@ -28,7 +28,7 @@ Exporter::export_ok_tags('all'); $GunzipError = ''; -$VERSION = '2.074'; +$VERSION = '2.084'; sub new { @@ -286,7 +286,7 @@ IO::Uncompress::Gunzip - Read RFC 1952 files/buffers my $status = gunzip $input => $output [,OPTS] or die "gunzip failed: $GunzipError\n"; - my $z = new IO::Uncompress::Gunzip $input [OPTS] + my $z = new IO::Uncompress::Gunzip $input [OPTS] or die "gunzip failed: $GunzipError\n"; $status = $z->read($buffer) @@ -340,7 +340,7 @@ section. use IO::Uncompress::Gunzip qw(gunzip $GunzipError) ; - gunzip $input_filename_or_reference => $output_filename_or_reference [,OPTS] + gunzip $input_filename_or_reference => $output_filename_or_reference [,OPTS] or die "gunzip failed: $GunzipError\n"; The functional interface needs Perl5.005 or better. @@ -353,7 +353,7 @@ C<$input_filename_or_reference> and C<$output_filename_or_reference>. =head3 The C<$input_filename_or_reference> parameter The parameter, C<$input_filename_or_reference>, is used to define the -source of the compressed data. +source of the compressed data. It can take one of the following forms: @@ -371,17 +371,17 @@ If the C<$input_filename_or_reference> parameter is a filehandle, the input data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input_filename_or_reference> is a scalar reference, the input data will be read from C<$$input_filename_or_reference>. -=item An array reference +=item An array reference If C<$input_filename_or_reference> is an array reference, each element in the array must be a filename. -The input data will be read from each file in turn. +The input data will be read from each file in turn. The complete array will be walked to ensure that it only contains valid filenames before any data is uncompressed. @@ -389,8 +389,8 @@ contains valid filenames before any data is uncompressed. =item An Input FileGlob string If C<$input_filename_or_reference> is a string that is delimited by the -characters "<" and ">" C<gunzip> will assume that it is an -I<input fileglob string>. The input is the list of files that match the +characters "<" and ">" C<gunzip> will assume that it is an +I<input fileglob string>. The input is the list of files that match the fileglob. See L<File::GlobMapper|File::GlobMapper> for more details. @@ -411,7 +411,7 @@ these forms. =item A filename If the C<$output_filename_or_reference> parameter is a simple scalar, it is -assumed to be a filename. This file will be opened for writing and the +assumed to be a filename. This file will be opened for writing and the uncompressed data will be written to it. =item A filehandle @@ -420,14 +420,14 @@ If the C<$output_filename_or_reference> parameter is a filehandle, the uncompressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output_filename_or_reference> is a scalar reference, the uncompressed data will be stored in C<$$output_filename_or_reference>. =item An Array Reference -If C<$output_filename_or_reference> is an array reference, +If C<$output_filename_or_reference> is an array reference, the uncompressed data will be pushed onto the array. =item An Output FileGlob @@ -466,7 +466,7 @@ L</"Constructor Options"> section below. =item C<< AutoClose => 0|1 >> -This option applies to any input or output data streams to +This option applies to any input or output data streams to C<gunzip> that are filehandles. If C<AutoClose> is specified, and the value is true, it will result in all @@ -477,10 +477,7 @@ This parameter defaults to 0. =item C<< BinModeOut => 0|1 >> -When writing to a file or filehandle, set C<binmode> before writing to the -file. - -Defaults to 0. +This option is now a no-op. All files will be written in binmode. =item C<< Append => 0|1 >> @@ -509,7 +506,7 @@ written to it. Otherwise the file pointer will not be moved. =back -When C<Append> is specified, and set to true, it will I<append> all uncompressed +When C<Append> is specified, and set to true, it will I<append> all uncompressed data to the output data stream. So when the output is a filehandle it will carry out a seek to the eof @@ -537,7 +534,7 @@ Defaults to 0. =item C<< TrailingData => $scalar >> Returns the data, if any, that is present immediately after the compressed -data stream once uncompression is complete. +data stream once uncompression is complete. This option can be used when there is useful information immediately following the compressed data stream, and you don't know the length of the @@ -549,7 +546,7 @@ end of the compressed data stream to the end of the buffer. If the input is a filehandle, C<trailingData> will return the data that is left in the filehandle input buffer once the end of the compressed data stream has been reached. You can then use the filehandle to read the rest -of the input file. +of the input file. Don't bother using C<trailingData> if the input is a filename. @@ -584,7 +581,7 @@ uncompressed data to a buffer, C<$buffer>. my $input = new IO::File "<file1.txt.gz" or die "Cannot open 'file1.txt.gz': $!\n" ; my $buffer ; - gunzip $input => \$buffer + gunzip $input => \$buffer or die "gunzip failed: $GunzipError\n"; To uncompress all files in the directory "/my/home" that match "*.txt.gz" and store the compressed data in the same directory @@ -606,7 +603,7 @@ and if you want to compress each file one at a time, this will do the trick { my $output = $input; $output =~ s/.gz// ; - gunzip $input => $output + gunzip $input => $output or die "Error compressing '$input': $GunzipError\n"; } @@ -647,7 +644,7 @@ If the C<$input> parameter is a filehandle, the compressed data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input> is a scalar reference, the compressed data will be read from C<$$input>. @@ -722,7 +719,7 @@ When present this option will limit the number of compressed bytes read from the input file/buffer to C<$size>. This option can be used in the situation where there is useful data directly after the compressed data stream and you know beforehand the exact length of the compressed data -stream. +stream. This option is mostly used when reading from a filehandle, in which case the file pointer will be left pointing to the first byte directly after the @@ -752,7 +749,7 @@ The default for this option is off. =over 5 -=item 1 +=item 1 If the FHCRC bit is set in the gzip FLG header byte, the CRC16 bytes in the header must match the crc16 value of the gzip header actually read. @@ -803,7 +800,7 @@ Defaults to 0. TODO -=head1 Methods +=head1 Methods =head2 read @@ -847,16 +844,16 @@ Usage is $line = $z->getline() $line = <$z> -Reads a single line. +Reads a single line. This method fully supports the use of the variable C<$/> (or C<$INPUT_RECORD_SEPARATOR> or C<$RS> when C<English> is in use) to determine what constitutes an end of line. Paragraph mode, record mode and -file slurp mode are all supported. +file slurp mode are all supported. =head2 getc -Usage is +Usage is $char = $z->getc() @@ -955,7 +952,7 @@ This is a noop provided for completeness. $z->opened() -Returns true if the object currently refers to a opened file/buffer. +Returns true if the object currently refers to a opened file/buffer. =head2 autoflush @@ -1002,7 +999,7 @@ C<undef>. $z->close() ; close $z ; -Closes the output file/buffer. +Closes the output file/buffer. For most versions of Perl this method will be automatically invoked if the IO::Uncompress::Gunzip object is destroyed (either explicitly or by the @@ -1056,7 +1053,7 @@ end of the compressed data stream to the end of the buffer. If the input is a filehandle, C<trailingData> will return the data that is left in the filehandle input buffer once the end of the compressed data stream has been reached. You can then use the filehandle to read the rest -of the input file. +of the input file. Don't bother using C<trailingData> if the input is a filename. @@ -1064,9 +1061,9 @@ If you know the length of the compressed data stream before you start uncompressing, you can avoid having to use C<trailingData> by setting the C<InputLength> option in the constructor. -=head1 Importing +=head1 Importing -No symbolic constants are required by this IO::Uncompress::Gunzip at present. +No symbolic constants are required by this IO::Uncompress::Gunzip at present. =over 5 @@ -1087,7 +1084,7 @@ See L<IO::Compress::FAQ|IO::Compress::FAQ/"Compressed files and Net::FTP"> =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> +L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -1095,7 +1092,7 @@ L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>, L<Archive::Tar|Archive::Tar>, L<IO::Zlib|IO::Zlib> -For RFC 1950, 1951 and 1952 see +For RFC 1950, 1951 and 1952 see L<http://www.faqs.org/rfcs/rfc1950.html>, L<http://www.faqs.org/rfcs/rfc1951.html> and L<http://www.faqs.org/rfcs/rfc1952.html> @@ -1110,7 +1107,7 @@ The primary site for gzip is L<http://www.gzip.org>. =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -1118,7 +1115,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Inflate.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Inflate.pm index 4e1b246fac..4d89db5b19 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Inflate.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Inflate.pm @@ -5,15 +5,15 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base::Common 2.074 qw(:Status ); -use IO::Compress::Zlib::Constants 2.074 ; +use IO::Compress::Base::Common 2.084 qw(:Status ); +use IO::Compress::Zlib::Constants 2.084 ; -use IO::Uncompress::RawInflate 2.074 ; +use IO::Uncompress::RawInflate 2.084 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $InflateError); -$VERSION = '2.074'; +$VERSION = '2.084'; $InflateError = ''; @ISA = qw(IO::Uncompress::RawInflate Exporter); @@ -208,7 +208,7 @@ IO::Uncompress::Inflate - Read RFC 1950 files/buffers my $status = inflate $input => $output [,OPTS] or die "inflate failed: $InflateError\n"; - my $z = new IO::Uncompress::Inflate $input [OPTS] + my $z = new IO::Uncompress::Inflate $input [OPTS] or die "inflate failed: $InflateError\n"; $status = $z->read($buffer) @@ -262,7 +262,7 @@ section. use IO::Uncompress::Inflate qw(inflate $InflateError) ; - inflate $input_filename_or_reference => $output_filename_or_reference [,OPTS] + inflate $input_filename_or_reference => $output_filename_or_reference [,OPTS] or die "inflate failed: $InflateError\n"; The functional interface needs Perl5.005 or better. @@ -275,7 +275,7 @@ C<$input_filename_or_reference> and C<$output_filename_or_reference>. =head3 The C<$input_filename_or_reference> parameter The parameter, C<$input_filename_or_reference>, is used to define the -source of the compressed data. +source of the compressed data. It can take one of the following forms: @@ -293,17 +293,17 @@ If the C<$input_filename_or_reference> parameter is a filehandle, the input data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input_filename_or_reference> is a scalar reference, the input data will be read from C<$$input_filename_or_reference>. -=item An array reference +=item An array reference If C<$input_filename_or_reference> is an array reference, each element in the array must be a filename. -The input data will be read from each file in turn. +The input data will be read from each file in turn. The complete array will be walked to ensure that it only contains valid filenames before any data is uncompressed. @@ -311,8 +311,8 @@ contains valid filenames before any data is uncompressed. =item An Input FileGlob string If C<$input_filename_or_reference> is a string that is delimited by the -characters "<" and ">" C<inflate> will assume that it is an -I<input fileglob string>. The input is the list of files that match the +characters "<" and ">" C<inflate> will assume that it is an +I<input fileglob string>. The input is the list of files that match the fileglob. See L<File::GlobMapper|File::GlobMapper> for more details. @@ -333,7 +333,7 @@ these forms. =item A filename If the C<$output_filename_or_reference> parameter is a simple scalar, it is -assumed to be a filename. This file will be opened for writing and the +assumed to be a filename. This file will be opened for writing and the uncompressed data will be written to it. =item A filehandle @@ -342,14 +342,14 @@ If the C<$output_filename_or_reference> parameter is a filehandle, the uncompressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output_filename_or_reference> is a scalar reference, the uncompressed data will be stored in C<$$output_filename_or_reference>. =item An Array Reference -If C<$output_filename_or_reference> is an array reference, +If C<$output_filename_or_reference> is an array reference, the uncompressed data will be pushed onto the array. =item An Output FileGlob @@ -388,7 +388,7 @@ L</"Constructor Options"> section below. =item C<< AutoClose => 0|1 >> -This option applies to any input or output data streams to +This option applies to any input or output data streams to C<inflate> that are filehandles. If C<AutoClose> is specified, and the value is true, it will result in all @@ -399,10 +399,7 @@ This parameter defaults to 0. =item C<< BinModeOut => 0|1 >> -When writing to a file or filehandle, set C<binmode> before writing to the -file. - -Defaults to 0. +This option is now a no-op. All files will be written in binmode. =item C<< Append => 0|1 >> @@ -431,7 +428,7 @@ written to it. Otherwise the file pointer will not be moved. =back -When C<Append> is specified, and set to true, it will I<append> all uncompressed +When C<Append> is specified, and set to true, it will I<append> all uncompressed data to the output data stream. So when the output is a filehandle it will carry out a seek to the eof @@ -459,7 +456,7 @@ Defaults to 0. =item C<< TrailingData => $scalar >> Returns the data, if any, that is present immediately after the compressed -data stream once uncompression is complete. +data stream once uncompression is complete. This option can be used when there is useful information immediately following the compressed data stream, and you don't know the length of the @@ -471,7 +468,7 @@ end of the compressed data stream to the end of the buffer. If the input is a filehandle, C<trailingData> will return the data that is left in the filehandle input buffer once the end of the compressed data stream has been reached. You can then use the filehandle to read the rest -of the input file. +of the input file. Don't bother using C<trailingData> if the input is a filename. @@ -506,7 +503,7 @@ uncompressed data to a buffer, C<$buffer>. my $input = new IO::File "<file1.txt.1950" or die "Cannot open 'file1.txt.1950': $!\n" ; my $buffer ; - inflate $input => \$buffer + inflate $input => \$buffer or die "inflate failed: $InflateError\n"; To uncompress all files in the directory "/my/home" that match "*.txt.1950" and store the compressed data in the same directory @@ -528,7 +525,7 @@ and if you want to compress each file one at a time, this will do the trick { my $output = $input; $output =~ s/.1950// ; - inflate $input => $output + inflate $input => $output or die "Error compressing '$input': $InflateError\n"; } @@ -569,7 +566,7 @@ If the C<$input> parameter is a filehandle, the compressed data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input> is a scalar reference, the compressed data will be read from C<$$input>. @@ -644,7 +641,7 @@ When present this option will limit the number of compressed bytes read from the input file/buffer to C<$size>. This option can be used in the situation where there is useful data directly after the compressed data stream and you know beforehand the exact length of the compressed data -stream. +stream. This option is mostly used when reading from a filehandle, in which case the file pointer will be left pointing to the first byte directly after the @@ -691,7 +688,7 @@ uncompressed data actually contained in the file. TODO -=head1 Methods +=head1 Methods =head2 read @@ -735,16 +732,16 @@ Usage is $line = $z->getline() $line = <$z> -Reads a single line. +Reads a single line. This method fully supports the use of the variable C<$/> (or C<$INPUT_RECORD_SEPARATOR> or C<$RS> when C<English> is in use) to determine what constitutes an end of line. Paragraph mode, record mode and -file slurp mode are all supported. +file slurp mode are all supported. =head2 getc -Usage is +Usage is $char = $z->getc() @@ -827,7 +824,7 @@ This is a noop provided for completeness. $z->opened() -Returns true if the object currently refers to a opened file/buffer. +Returns true if the object currently refers to a opened file/buffer. =head2 autoflush @@ -874,7 +871,7 @@ C<undef>. $z->close() ; close $z ; -Closes the output file/buffer. +Closes the output file/buffer. For most versions of Perl this method will be automatically invoked if the IO::Uncompress::Inflate object is destroyed (either explicitly or by the @@ -928,7 +925,7 @@ end of the compressed data stream to the end of the buffer. If the input is a filehandle, C<trailingData> will return the data that is left in the filehandle input buffer once the end of the compressed data stream has been reached. You can then use the filehandle to read the rest -of the input file. +of the input file. Don't bother using C<trailingData> if the input is a filename. @@ -936,9 +933,9 @@ If you know the length of the compressed data stream before you start uncompressing, you can avoid having to use C<trailingData> by setting the C<InputLength> option in the constructor. -=head1 Importing +=head1 Importing -No symbolic constants are required by this IO::Uncompress::Inflate at present. +No symbolic constants are required by this IO::Uncompress::Inflate at present. =over 5 @@ -959,7 +956,7 @@ See L<IO::Compress::FAQ|IO::Compress::FAQ/"Compressed files and Net::FTP"> =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> +L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -967,7 +964,7 @@ L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>, L<Archive::Tar|Archive::Tar>, L<IO::Zlib|IO::Zlib> -For RFC 1950, 1951 and 1952 see +For RFC 1950, 1951 and 1952 see L<http://www.faqs.org/rfcs/rfc1950.html>, L<http://www.faqs.org/rfcs/rfc1951.html> and L<http://www.faqs.org/rfcs/rfc1952.html> @@ -982,7 +979,7 @@ The primary site for gzip is L<http://www.gzip.org>. =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -990,7 +987,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/RawInflate.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/RawInflate.pm index 831940301d..63703cd975 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/RawInflate.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/RawInflate.pm @@ -5,16 +5,16 @@ use strict ; use warnings; use bytes; -use Compress::Raw::Zlib 2.074 ; -use IO::Compress::Base::Common 2.074 qw(:Status ); +use Compress::Raw::Zlib 2.084 ; +use IO::Compress::Base::Common 2.084 qw(:Status ); -use IO::Uncompress::Base 2.074 ; -use IO::Uncompress::Adapter::Inflate 2.074 ; +use IO::Uncompress::Base 2.084 ; +use IO::Uncompress::Adapter::Inflate 2.084 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $RawInflateError); -$VERSION = '2.074'; +$VERSION = '2.084'; $RawInflateError = ''; @ISA = qw(IO::Uncompress::Base Exporter); @@ -356,7 +356,7 @@ IO::Uncompress::RawInflate - Read RFC 1951 files/buffers my $status = rawinflate $input => $output [,OPTS] or die "rawinflate failed: $RawInflateError\n"; - my $z = new IO::Uncompress::RawInflate $input [OPTS] + my $z = new IO::Uncompress::RawInflate $input [OPTS] or die "rawinflate failed: $RawInflateError\n"; $status = $z->read($buffer) @@ -410,7 +410,7 @@ section. use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ; - rawinflate $input_filename_or_reference => $output_filename_or_reference [,OPTS] + rawinflate $input_filename_or_reference => $output_filename_or_reference [,OPTS] or die "rawinflate failed: $RawInflateError\n"; The functional interface needs Perl5.005 or better. @@ -423,7 +423,7 @@ C<$input_filename_or_reference> and C<$output_filename_or_reference>. =head3 The C<$input_filename_or_reference> parameter The parameter, C<$input_filename_or_reference>, is used to define the -source of the compressed data. +source of the compressed data. It can take one of the following forms: @@ -441,17 +441,17 @@ If the C<$input_filename_or_reference> parameter is a filehandle, the input data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input_filename_or_reference> is a scalar reference, the input data will be read from C<$$input_filename_or_reference>. -=item An array reference +=item An array reference If C<$input_filename_or_reference> is an array reference, each element in the array must be a filename. -The input data will be read from each file in turn. +The input data will be read from each file in turn. The complete array will be walked to ensure that it only contains valid filenames before any data is uncompressed. @@ -459,8 +459,8 @@ contains valid filenames before any data is uncompressed. =item An Input FileGlob string If C<$input_filename_or_reference> is a string that is delimited by the -characters "<" and ">" C<rawinflate> will assume that it is an -I<input fileglob string>. The input is the list of files that match the +characters "<" and ">" C<rawinflate> will assume that it is an +I<input fileglob string>. The input is the list of files that match the fileglob. See L<File::GlobMapper|File::GlobMapper> for more details. @@ -481,7 +481,7 @@ these forms. =item A filename If the C<$output_filename_or_reference> parameter is a simple scalar, it is -assumed to be a filename. This file will be opened for writing and the +assumed to be a filename. This file will be opened for writing and the uncompressed data will be written to it. =item A filehandle @@ -490,14 +490,14 @@ If the C<$output_filename_or_reference> parameter is a filehandle, the uncompressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output_filename_or_reference> is a scalar reference, the uncompressed data will be stored in C<$$output_filename_or_reference>. =item An Array Reference -If C<$output_filename_or_reference> is an array reference, +If C<$output_filename_or_reference> is an array reference, the uncompressed data will be pushed onto the array. =item An Output FileGlob @@ -536,7 +536,7 @@ L</"Constructor Options"> section below. =item C<< AutoClose => 0|1 >> -This option applies to any input or output data streams to +This option applies to any input or output data streams to C<rawinflate> that are filehandles. If C<AutoClose> is specified, and the value is true, it will result in all @@ -547,10 +547,7 @@ This parameter defaults to 0. =item C<< BinModeOut => 0|1 >> -When writing to a file or filehandle, set C<binmode> before writing to the -file. - -Defaults to 0. +This option is now a no-op. All files will be written in binmode. =item C<< Append => 0|1 >> @@ -579,7 +576,7 @@ written to it. Otherwise the file pointer will not be moved. =back -When C<Append> is specified, and set to true, it will I<append> all uncompressed +When C<Append> is specified, and set to true, it will I<append> all uncompressed data to the output data stream. So when the output is a filehandle it will carry out a seek to the eof @@ -604,7 +601,7 @@ This option is a no-op. =item C<< TrailingData => $scalar >> Returns the data, if any, that is present immediately after the compressed -data stream once uncompression is complete. +data stream once uncompression is complete. This option can be used when there is useful information immediately following the compressed data stream, and you don't know the length of the @@ -616,7 +613,7 @@ end of the compressed data stream to the end of the buffer. If the input is a filehandle, C<trailingData> will return the data that is left in the filehandle input buffer once the end of the compressed data stream has been reached. You can then use the filehandle to read the rest -of the input file. +of the input file. Don't bother using C<trailingData> if the input is a filename. @@ -651,7 +648,7 @@ uncompressed data to a buffer, C<$buffer>. my $input = new IO::File "<file1.txt.1951" or die "Cannot open 'file1.txt.1951': $!\n" ; my $buffer ; - rawinflate $input => \$buffer + rawinflate $input => \$buffer or die "rawinflate failed: $RawInflateError\n"; To uncompress all files in the directory "/my/home" that match "*.txt.1951" and store the compressed data in the same directory @@ -673,7 +670,7 @@ and if you want to compress each file one at a time, this will do the trick { my $output = $input; $output =~ s/.1951// ; - rawinflate $input => $output + rawinflate $input => $output or die "Error compressing '$input': $RawInflateError\n"; } @@ -714,7 +711,7 @@ If the C<$input> parameter is a filehandle, the compressed data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input> is a scalar reference, the compressed data will be read from C<$$input>. @@ -789,7 +786,7 @@ When present this option will limit the number of compressed bytes read from the input file/buffer to C<$size>. This option can be used in the situation where there is useful data directly after the compressed data stream and you know beforehand the exact length of the compressed data -stream. +stream. This option is mostly used when reading from a filehandle, in which case the file pointer will be left pointing to the first byte directly after the @@ -819,7 +816,7 @@ This option is a no-op. TODO -=head1 Methods +=head1 Methods =head2 read @@ -863,16 +860,16 @@ Usage is $line = $z->getline() $line = <$z> -Reads a single line. +Reads a single line. This method fully supports the use of the variable C<$/> (or C<$INPUT_RECORD_SEPARATOR> or C<$RS> when C<English> is in use) to determine what constitutes an end of line. Paragraph mode, record mode and -file slurp mode are all supported. +file slurp mode are all supported. =head2 getc -Usage is +Usage is $char = $z->getc() @@ -955,7 +952,7 @@ This is a noop provided for completeness. $z->opened() -Returns true if the object currently refers to a opened file/buffer. +Returns true if the object currently refers to a opened file/buffer. =head2 autoflush @@ -1002,7 +999,7 @@ C<undef>. $z->close() ; close $z ; -Closes the output file/buffer. +Closes the output file/buffer. For most versions of Perl this method will be automatically invoked if the IO::Uncompress::RawInflate object is destroyed (either explicitly or by the @@ -1056,7 +1053,7 @@ end of the compressed data stream to the end of the buffer. If the input is a filehandle, C<trailingData> will return the data that is left in the filehandle input buffer once the end of the compressed data stream has been reached. You can then use the filehandle to read the rest -of the input file. +of the input file. Don't bother using C<trailingData> if the input is a filename. @@ -1064,9 +1061,9 @@ If you know the length of the compressed data stream before you start uncompressing, you can avoid having to use C<trailingData> by setting the C<InputLength> option in the constructor. -=head1 Importing +=head1 Importing -No symbolic constants are required by this IO::Uncompress::RawInflate at present. +No symbolic constants are required by this IO::Uncompress::RawInflate at present. =over 5 @@ -1087,7 +1084,7 @@ See L<IO::Compress::FAQ|IO::Compress::FAQ/"Compressed files and Net::FTP"> =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> +L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -1095,7 +1092,7 @@ L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>, L<Archive::Tar|Archive::Tar>, L<IO::Zlib|IO::Zlib> -For RFC 1950, 1951 and 1952 see +For RFC 1950, 1951 and 1952 see L<http://www.faqs.org/rfcs/rfc1950.html>, L<http://www.faqs.org/rfcs/rfc1951.html> and L<http://www.faqs.org/rfcs/rfc1952.html> @@ -1110,7 +1107,7 @@ The primary site for gzip is L<http://www.gzip.org>. =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -1118,7 +1115,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Unzip.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Unzip.pm index 5a35e018a6..4e8a0d67c7 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Unzip.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/IO/Uncompress/Unzip.pm @@ -9,14 +9,14 @@ use warnings; use bytes; use IO::File; -use IO::Uncompress::RawInflate 2.074 ; -use IO::Compress::Base::Common 2.074 qw(:Status ); -use IO::Uncompress::Adapter::Inflate 2.074 ; -use IO::Uncompress::Adapter::Identity 2.074 ; -use IO::Compress::Zlib::Extra 2.074 ; -use IO::Compress::Zip::Constants 2.074 ; +use IO::Uncompress::RawInflate 2.084 ; +use IO::Compress::Base::Common 2.084 qw(:Status ); +use IO::Uncompress::Adapter::Inflate 2.084 ; +use IO::Uncompress::Adapter::Identity 2.084 ; +use IO::Compress::Zlib::Extra 2.084 ; +use IO::Compress::Zip::Constants 2.084 ; -use Compress::Raw::Zlib 2.074 () ; +use Compress::Raw::Zlib 2.084 () ; BEGIN { @@ -31,7 +31,7 @@ require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $UnzipError, %headerLookup); -$VERSION = '2.074'; +$VERSION = '2.084'; $UnzipError = ''; @ISA = qw(IO::Uncompress::RawInflate Exporter); @@ -171,25 +171,27 @@ sub readHeader # TODO - when Stream is off, use seek my $buffer; if (*$self->{ZipData}{Streaming}) { - while (1) { my $b; my $status = $self->smartRead(\$b, 1024 * 16); - return undef + + return $self->saveErrorString(undef, "Truncated file") if $status <= 0 ; - my $temp_buf; + my $temp_buf ; my $out; + $status = *$self->{Uncomp}->uncompr(\$b, \$temp_buf, 0, $out); return $self->saveErrorString(undef, *$self->{Uncomp}{Error}, *$self->{Uncomp}{ErrorNo}) if $self->saveStatus($status) == STATUS_ERROR; + $self->pushBack($b) ; + if ($status == STATUS_ENDSTREAM) { *$self->{Uncomp}->reset(); - $self->pushBack($b) ; last; } } @@ -461,6 +463,7 @@ sub skipEndCentralDirectory my $self = shift; my $magic = shift ; + my $buffer; $self->smartReadExact(\$buffer, 22 - 4) or return $self->TrailerError("Minimum header size is " . @@ -1042,7 +1045,7 @@ IO::Uncompress::Unzip - Read zip files/buffers my $status = unzip $input => $output [,OPTS] or die "unzip failed: $UnzipError\n"; - my $z = new IO::Uncompress::Unzip $input [OPTS] + my $z = new IO::Uncompress::Unzip $input [OPTS] or die "unzip failed: $UnzipError\n"; $status = $z->read($buffer) @@ -1096,7 +1099,7 @@ section. use IO::Uncompress::Unzip qw(unzip $UnzipError) ; - unzip $input_filename_or_reference => $output_filename_or_reference [,OPTS] + unzip $input_filename_or_reference => $output_filename_or_reference [,OPTS] or die "unzip failed: $UnzipError\n"; The functional interface needs Perl5.005 or better. @@ -1109,7 +1112,7 @@ C<$input_filename_or_reference> and C<$output_filename_or_reference>. =head3 The C<$input_filename_or_reference> parameter The parameter, C<$input_filename_or_reference>, is used to define the -source of the compressed data. +source of the compressed data. It can take one of the following forms: @@ -1127,17 +1130,17 @@ If the C<$input_filename_or_reference> parameter is a filehandle, the input data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input_filename_or_reference> is a scalar reference, the input data will be read from C<$$input_filename_or_reference>. -=item An array reference +=item An array reference If C<$input_filename_or_reference> is an array reference, each element in the array must be a filename. -The input data will be read from each file in turn. +The input data will be read from each file in turn. The complete array will be walked to ensure that it only contains valid filenames before any data is uncompressed. @@ -1145,8 +1148,8 @@ contains valid filenames before any data is uncompressed. =item An Input FileGlob string If C<$input_filename_or_reference> is a string that is delimited by the -characters "<" and ">" C<unzip> will assume that it is an -I<input fileglob string>. The input is the list of files that match the +characters "<" and ">" C<unzip> will assume that it is an +I<input fileglob string>. The input is the list of files that match the fileglob. See L<File::GlobMapper|File::GlobMapper> for more details. @@ -1167,7 +1170,7 @@ these forms. =item A filename If the C<$output_filename_or_reference> parameter is a simple scalar, it is -assumed to be a filename. This file will be opened for writing and the +assumed to be a filename. This file will be opened for writing and the uncompressed data will be written to it. =item A filehandle @@ -1176,14 +1179,14 @@ If the C<$output_filename_or_reference> parameter is a filehandle, the uncompressed data will be written to it. The string '-' can be used as an alias for standard output. -=item A scalar reference +=item A scalar reference If C<$output_filename_or_reference> is a scalar reference, the uncompressed data will be stored in C<$$output_filename_or_reference>. =item An Array Reference -If C<$output_filename_or_reference> is an array reference, +If C<$output_filename_or_reference> is an array reference, the uncompressed data will be pushed onto the array. =item An Output FileGlob @@ -1222,7 +1225,7 @@ L</"Constructor Options"> section below. =item C<< AutoClose => 0|1 >> -This option applies to any input or output data streams to +This option applies to any input or output data streams to C<unzip> that are filehandles. If C<AutoClose> is specified, and the value is true, it will result in all @@ -1233,10 +1236,7 @@ This parameter defaults to 0. =item C<< BinModeOut => 0|1 >> -When writing to a file or filehandle, set C<binmode> before writing to the -file. - -Defaults to 0. +This option is now a no-op. All files will be written in binmode. =item C<< Append => 0|1 >> @@ -1265,7 +1265,7 @@ written to it. Otherwise the file pointer will not be moved. =back -When C<Append> is specified, and set to true, it will I<append> all uncompressed +When C<Append> is specified, and set to true, it will I<append> all uncompressed data to the output data stream. So when the output is a filehandle it will carry out a seek to the eof @@ -1293,7 +1293,7 @@ Defaults to 0. =item C<< TrailingData => $scalar >> Returns the data, if any, that is present immediately after the compressed -data stream once uncompression is complete. +data stream once uncompression is complete. This option can be used when there is useful information immediately following the compressed data stream, and you don't know the length of the @@ -1305,7 +1305,7 @@ end of the compressed data stream to the end of the buffer. If the input is a filehandle, C<trailingData> will return the data that is left in the filehandle input buffer once the end of the compressed data stream has been reached. You can then use the filehandle to read the rest -of the input file. +of the input file. Don't bother using C<trailingData> if the input is a filename. @@ -1331,7 +1331,7 @@ file C<file1.txt> like this. or die "unzip failed: $UnzipError\n"; If you have a zip file that contains multiple members and want to read a -specific member from the file, say C<"data1">, use the C<Name> option +specific member from the file, say C<"data1">, use the C<Name> option use strict ; use warnings ; @@ -1366,7 +1366,7 @@ uncompressed data to a buffer, C<$buffer>. my $input = new IO::File "<file1.zip" or die "Cannot open 'file1.zip': $!\n" ; my $buffer ; - unzip $input => \$buffer + unzip $input => \$buffer or die "unzip failed: $UnzipError\n"; =head1 OO Interface @@ -1406,7 +1406,7 @@ If the C<$input> parameter is a filehandle, the compressed data will be read from it. The string '-' can be used as an alias for standard input. -=item A scalar reference +=item A scalar reference If C<$input> is a scalar reference, the compressed data will be read from C<$$input>. @@ -1429,7 +1429,7 @@ OPTS is a combination of the following options: =item C<< Name => "membername" >> -Open "membername" from the zip file for reading. +Open "membername" from the zip file for reading. =item C<< AutoClose => 0|1 >> @@ -1484,7 +1484,7 @@ When present this option will limit the number of compressed bytes read from the input file/buffer to C<$size>. This option can be used in the situation where there is useful data directly after the compressed data stream and you know beforehand the exact length of the compressed data -stream. +stream. This option is mostly used when reading from a filehandle, in which case the file pointer will be left pointing to the first byte directly after the @@ -1518,7 +1518,7 @@ The default for this option is off. TODO -=head1 Methods +=head1 Methods =head2 read @@ -1562,16 +1562,16 @@ Usage is $line = $z->getline() $line = <$z> -Reads a single line. +Reads a single line. This method fully supports the use of the variable C<$/> (or C<$INPUT_RECORD_SEPARATOR> or C<$RS> when C<English> is in use) to determine what constitutes an end of line. Paragraph mode, record mode and -file slurp mode are all supported. +file slurp mode are all supported. =head2 getc -Usage is +Usage is $char = $z->getc() @@ -1654,7 +1654,7 @@ This is a noop provided for completeness. $z->opened() -Returns true if the object currently refers to a opened file/buffer. +Returns true if the object currently refers to a opened file/buffer. =head2 autoflush @@ -1701,7 +1701,7 @@ C<undef>. $z->close() ; close $z ; -Closes the output file/buffer. +Closes the output file/buffer. For most versions of Perl this method will be automatically invoked if the IO::Uncompress::Unzip object is destroyed (either explicitly or by the @@ -1755,7 +1755,7 @@ end of the compressed data stream to the end of the buffer. If the input is a filehandle, C<trailingData> will return the data that is left in the filehandle input buffer once the end of the compressed data stream has been reached. You can then use the filehandle to read the rest -of the input file. +of the input file. Don't bother using C<trailingData> if the input is a filename. @@ -1763,9 +1763,9 @@ If you know the length of the compressed data stream before you start uncompressing, you can avoid having to use C<trailingData> by setting the C<InputLength> option in the constructor. -=head1 Importing +=head1 Importing -No symbolic constants are required by this IO::Uncompress::Unzip at present. +No symbolic constants are required by this IO::Uncompress::Unzip at present. =over 5 @@ -1830,7 +1830,7 @@ The script is available from L<https://gist.github.com/eqhmcow/5389877> =head1 SEE ALSO -L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> +L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> L<IO::Compress::FAQ|IO::Compress::FAQ> @@ -1838,7 +1838,7 @@ L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>, L<Archive::Tar|Archive::Tar>, L<IO::Zlib|IO::Zlib> -For RFC 1950, 1951 and 1952 see +For RFC 1950, 1951 and 1952 see L<http://www.faqs.org/rfcs/rfc1950.html>, L<http://www.faqs.org/rfcs/rfc1951.html> and L<http://www.faqs.org/rfcs/rfc1952.html> @@ -1853,7 +1853,7 @@ The primary site for gzip is L<http://www.gzip.org>. =head1 AUTHOR -This module was written by Paul Marquess, C<pmqs@cpan.org>. +This module was written by Paul Marquess, C<pmqs@cpan.org>. =head1 MODIFICATION HISTORY @@ -1861,7 +1861,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2017 Paul Marquess. All rights reserved. +Copyright (c) 2005-2019 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. |