diff options
author | Richard Leach <richardleach@users.noreply.github.com> | 2021-01-18 00:40:05 +0000 |
---|---|---|
committer | Richard Leach <richardleach@users.noreply.github.com> | 2021-01-18 00:40:05 +0000 |
commit | e4a01f167058bce6a22e55dfbeb5ec95eafdbaf7 (patch) | |
tree | cd59cf8a88e5cf13210b29434d9edcefcfba6aff /cpan | |
parent | c9b1d81937f30abcada0bac02a0f338b31ce295e (diff) | |
download | perl-e4a01f167058bce6a22e55dfbeb5ec95eafdbaf7.tar.gz |
Update Compress::Raw::Bzip2 from 2.096 to 2.100
Diffstat (limited to 'cpan')
-rw-r--r-- | cpan/Compress-Raw-Bzip2/Makefile.PL | 39 | ||||
-rw-r--r-- | cpan/Compress-Raw-Bzip2/lib/Compress/Raw/Bzip2.pm | 15 | ||||
-rw-r--r-- | cpan/Compress-Raw-Bzip2/private/MakeUtil.pm | 22 | ||||
-rw-r--r-- | cpan/Compress-Raw-Bzip2/t/000prereq.t | 17 | ||||
-rw-r--r-- | cpan/Compress-Raw-Bzip2/t/09limitoutput.t | 33 | ||||
-rw-r--r-- | cpan/Compress-Raw-Bzip2/t/19nonpv.t | 28 | ||||
-rw-r--r-- | cpan/Compress-Raw-Bzip2/t/compress/CompTestUtils.pm | 52 | ||||
-rw-r--r-- | cpan/Compress-Raw-Bzip2/typemap | 4 |
8 files changed, 98 insertions, 112 deletions
diff --git a/cpan/Compress-Raw-Bzip2/Makefile.PL b/cpan/Compress-Raw-Bzip2/Makefile.PL index d603454101..b4b95ec7ed 100644 --- a/cpan/Compress-Raw-Bzip2/Makefile.PL +++ b/cpan/Compress-Raw-Bzip2/Makefile.PL @@ -18,10 +18,10 @@ my $BZIP2_INCLUDE = defined($ENV{BZIP2_INCLUDE}) ? $ENV{BZIP2_INCLUDE} : '.'; #ParseCONFIG() ; -UpDowngrade(getPerlFiles('MANIFEST')) +UpDowngrade(getPerlFiles('MANIFEST')) unless $ENV{PERL_CORE}; -WriteMakefile( +WriteMakefile( NAME => 'Compress::Raw::Bzip2', VERSION_FROM => 'lib/Compress/Raw/Bzip2.pm', INC => "-I$BZIP2_INCLUDE" , @@ -29,7 +29,7 @@ WriteMakefile( XS => { 'Bzip2.xs' => 'Bzip2.c'}, 'clean' => { FILES => '*.c bzip2.h bzlib.h bzlib_private.h constants.h constants.xs' }, #'depend' => { 'Makefile' => 'config.in' }, - 'dist' => { COMPRESS => 'gzip', + 'dist' => { COMPRESS => 'gzip', TARFLAGS => '-chvf', SUFFIX => 'gz', DIST_DEFAULT => 'MyTrebleCheck tardist', @@ -40,7 +40,7 @@ WriteMakefile( ? bzip2_files($BZIP2_LIB) : (LIBS => [ "-L$BZIP2_LIB -lbz2 " ]) ), - + ( $] >= 5.005 ? (ABSTRACT_FROM => 'lib/Compress/Raw/Bzip2.pm', @@ -50,9 +50,9 @@ WriteMakefile( INSTALLDIRS => ($] > 5.010 && $] < 5.011 ? 'perl' : 'site'), - ( eval { ExtUtils::MakeMaker->VERSION(6.46) } + ( eval { ExtUtils::MakeMaker->VERSION(6.46) } ? ( META_MERGE => { - + "meta-spec" => { version => 2 }, no_index => { @@ -60,7 +60,7 @@ WriteMakefile( }, resources => { - + bugtracker => { web => 'https://github.com/pmqs/Compress-Raw-Bzip2/issues' }, @@ -71,15 +71,15 @@ WriteMakefile( type => 'git', url => 'git://github.com/pmqs/Compress-Raw-Bzip2.git', web => 'https://github.com/pmqs/Compress-Raw-Bzip2', - }, + }, }, - } - ) + } + ) : () - ), + ), ((ExtUtils::MakeMaker->VERSION() gt '6.30') ? - ('LICENSE' => 'perl') : ()), + ('LICENSE' => 'perl') : ()), ) ; @@ -127,7 +127,7 @@ if (eval {require ExtUtils::Constant; 1}) { die "The following names are missing from \@EXPORT in Bzip2.pm\n" . "\t$missing\n" ; } - + #push @names, {name => 'BZ_VERSION', type => 'PV' }; ExtUtils::Constant::WriteConstants( @@ -135,9 +135,9 @@ if (eval {require ExtUtils::Constant; 1}) { NAMES => \@names, C_FILE => 'constants.h', XS_FILE => 'constants.xs', - + ); -} +} else { foreach my $name (qw( constants.h constants.xs )) { @@ -166,8 +166,8 @@ sub bzip2_files foreach my $file (@c_files, @h_files) { copy(catfile($dir, $file), '.') } - - + + @h_files = map { catfile($dir, $_) } @h_files ; my @o_files = map { "$_\$(OBJ_EXT)" } 'Bzip2', @c_files; push @c_files, 'Bzip2.c' ; @@ -177,10 +177,7 @@ sub bzip2_files 'C' => [ @c_files ] , #'OBJECT' => qq[ @o_files ], 'OBJECT' => q[ $(O_FILES) ], - + ) ; } - - - diff --git a/cpan/Compress-Raw-Bzip2/lib/Compress/Raw/Bzip2.pm b/cpan/Compress-Raw-Bzip2/lib/Compress/Raw/Bzip2.pm index 842aba3e8b..695f108bb8 100644 --- a/cpan/Compress-Raw-Bzip2/lib/Compress/Raw/Bzip2.pm +++ b/cpan/Compress-Raw-Bzip2/lib/Compress/Raw/Bzip2.pm @@ -11,8 +11,8 @@ use Carp ; use bytes ; our ($VERSION, $XS_VERSION, @ISA, @EXPORT, $AUTOLOAD); -$VERSION = '2.096'; -$XS_VERSION = $VERSION; +$VERSION = '2.100'; +$XS_VERSION = $VERSION; $VERSION = eval $VERSION; @ISA = qw(Exporter); @@ -61,11 +61,11 @@ eval { require XSLoader; XSLoader::load('Compress::Raw::Bzip2', $XS_VERSION); 1; -} +} or do { require DynaLoader; local @ISA = qw(DynaLoader); - bootstrap Compress::Raw::Bzip2 $XS_VERSION ; + bootstrap Compress::Raw::Bzip2 $XS_VERSION ; }; #sub Compress::Raw::Bzip2::new @@ -132,14 +132,14 @@ Compress::Raw::Bzip2 - Low-Level Interface to bzip2 compression library my ($bz, $status) = new Compress::Raw::Bzip2 [OPTS] or die "Cannot create bzip2 object: $bzerno\n"; - + $status = $bz->bzdeflate($input, $output); $status = $bz->bzflush($output); $status = $bz->bzclose($output); my ($bz, $status) = new Compress::Raw::Bunzip2 [OPTS] or die "Cannot create bunzip2 object: $bzerno\n"; - + $status = $bz->bzinflate($input, $output); my $version = Compress::Raw::Bzip2::bzlibversion(); @@ -384,8 +384,7 @@ See the Changes file. =head1 COPYRIGHT AND LICENSE -Copyright (c) 2005-2020 Paul Marquess. All rights reserved. +Copyright (c) 2005-2021 Paul Marquess. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. - diff --git a/cpan/Compress-Raw-Bzip2/private/MakeUtil.pm b/cpan/Compress-Raw-Bzip2/private/MakeUtil.pm index 12fa26fd05..aa540c68fd 100644 --- a/cpan/Compress-Raw-Bzip2/private/MakeUtil.pm +++ b/cpan/Compress-Raw-Bzip2/private/MakeUtil.pm @@ -42,14 +42,14 @@ sub MY::libscan return $path; } -sub MY::postamble +sub MY::postamble { return '' if $ENV{PERL_CORE} ; my @files = getPerlFiles('MANIFEST'); - # Note: Once you remove all the layers of shell/makefile escaping + # Note: Once you remove all the layers of shell/makefile escaping # the regular expression below reads # # /^\s*local\s*\(\s*\$^W\s*\)/ @@ -215,7 +215,7 @@ sub UpDowngrade foreach (@files) { #if (-l $_ ) { doUpDown($our_sub, $warn_sub, $_) } - #else + #else #{ doUpDownViaCopy($our_sub, $warn_sub, $_) } } @@ -234,7 +234,7 @@ sub doUpDown local ($^I) = ($^O eq 'VMS') ? "_bak" : ".bak"; local (@ARGV) = shift; - + while (<>) { print, last if /^__(END|DATA)__/ ; @@ -277,7 +277,7 @@ sub doUpDownViaCopy push @keep, $_; last ; } - + &{ $our_sub }() if $our_sub ; &{ $warn_sub }() if $warn_sub ; push @keep, $_; @@ -334,7 +334,7 @@ sub FindBrokenDependencies Compress::Zlib ); - + my @broken = (); foreach my $module ( grep { ! $thisModule{$_} } @modules) @@ -342,12 +342,12 @@ sub FindBrokenDependencies my $hasVersion = getInstalledVersion($module); # No need to upgrade if the module isn't installed at all - next + next if ! defined $hasVersion; # If already have C::Z version 1, then an upgrade to any of the # IO::Compress modules will not break it. - next + next if $module eq 'Compress::Zlib' && $hasVersion < 2; if ($hasVersion < $version) @@ -370,14 +370,12 @@ sub getInstalledVersion { no strict 'refs'; $version = ${ $module . "::VERSION" }; - $version = 0 + $version = 0 } - + return $version; } package MakeUtil ; 1; - - diff --git a/cpan/Compress-Raw-Bzip2/t/000prereq.t b/cpan/Compress-Raw-Bzip2/t/000prereq.t index 397366c00c..2eeff53845 100644 --- a/cpan/Compress-Raw-Bzip2/t/000prereq.t +++ b/cpan/Compress-Raw-Bzip2/t/000prereq.t @@ -19,13 +19,13 @@ BEGIN if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; - my $VERSION = '2.096'; + my $VERSION = '2.100'; my @NAMES = qw( - + ); my @OPT = qw( - + ); plan tests => 1 + @NAMES + @OPT + $extra ; @@ -43,15 +43,14 @@ BEGIN eval " require $name " ; if ($@) { - ok 1, "$name not available" + ok 1, "$name not available" } - else + else { my $ver = eval("\$${name}::VERSION"); - is $ver, $VERSION, "$name version should be $VERSION" + is $ver, $VERSION, "$name version should be $VERSION" or diag "$name version is $ver, need $VERSION" ; - } + } } - -} +} diff --git a/cpan/Compress-Raw-Bzip2/t/09limitoutput.t b/cpan/Compress-Raw-Bzip2/t/09limitoutput.t index 78e121aa90..63138a0d0f 100644 --- a/cpan/Compress-Raw-Bzip2/t/09limitoutput.t +++ b/cpan/Compress-Raw-Bzip2/t/09limitoutput.t @@ -13,8 +13,8 @@ use bytes; use Test::More ; use CompTestUtils; -BEGIN -{ +BEGIN +{ # use Test::NoWarnings, if available my $extra = 0 ; $extra = 1 @@ -22,7 +22,7 @@ BEGIN plan tests => 88 + $extra ; - use_ok('Compress::Raw::Bzip2') ; + use_ok('Compress::Raw::Bzip2') ; } @@ -30,7 +30,7 @@ BEGIN my $hello = "I am a HAL 9000 computer" x 2001; my $tmp = $hello ; -my ($err, $x, $X, $status); +my ($err, $x, $X, $status); ok( ($x, $err) = new Compress::Raw::Bzip2 (1)); ok $x ; @@ -52,7 +52,7 @@ cmp_ok $x->bzclose($out), '==', BZ_STREAM_END, " bzflush returned BZ_STREAM_END ok $GOT eq $hello; } - + sub getOut { my $x = ''; return \$x } for my $bufsize (1, 2, 3, 13, 4096, 1024*10) @@ -68,7 +68,7 @@ for my $bufsize (1, 2, 3, 13, 4096, 1024*10) )); ok $k ; cmp_ok $err, '==', BZ_OK, " status is BZ_OK" ; - + is $k->total_in_lo32(), 0, " total_in_lo32 == 0" ; is $k->total_out_lo32(), 0, " total_out_lo32 == 0" ; my $GOT = getOut(); @@ -83,7 +83,7 @@ for my $bufsize (1, 2, 3, 13, 4096, 1024*10) last if $status != BZ_OK; $deltaOK = 0 if length($GOT) - $prev > $bufsize; } - + ok $deltaOK, " Output Delta never > $bufsize"; cmp_ok $looped, '>=', 1, " looped $looped"; is length($tmp), 0, " length of input buffer is zero"; @@ -98,7 +98,7 @@ sub getit { my $obj = shift ; my $input = shift; - + my $data ; 1 while $obj->bzinflate($input, $data) != BZ_STREAM_END ; return \$data ; @@ -106,9 +106,9 @@ sub getit { title "regression test"; - - my ($err, $x, $X, $status); - + + my ($err, $x, $X, $status); + ok( ($x, $err) = new Compress::Raw::Bzip2 (1)); ok $x ; cmp_ok $err, '==', BZ_OK, " status is BZ_OK" ; @@ -117,11 +117,11 @@ sub getit my $line2 = "second line\n" ; my $text = $line1 . $line2 ; my $tmp = $text; - + my $out ; $status = $x->bzdeflate($tmp, $out) ; cmp_ok $status, '==', BZ_RUN_OK, " status is BZ_RUN_OK" ; - + cmp_ok $x->bzclose($out), '==', BZ_STREAM_END, " bzclose returned BZ_STREAM_END" ; my $k; @@ -130,10 +130,9 @@ sub getit #LimitOutput => 1 )); - + my $c = getit($k, $out); is $$c, $text; - - -} + +} diff --git a/cpan/Compress-Raw-Bzip2/t/19nonpv.t b/cpan/Compress-Raw-Bzip2/t/19nonpv.t index 15d53b92ca..d97de7e940 100644 --- a/cpan/Compress-Raw-Bzip2/t/19nonpv.t +++ b/cpan/Compress-Raw-Bzip2/t/19nonpv.t @@ -12,8 +12,8 @@ use warnings; use Test::More ; use CompTestUtils; -BEGIN -{ +BEGIN +{ # use Test::NoWarnings, if available my $extra = 0 ; $extra = 1 @@ -23,7 +23,7 @@ BEGIN use_ok('Compress::Raw::Bzip2', 2) ; } - + my $hello = <<EOM ; @@ -41,12 +41,12 @@ my $len = length $hello ; my $hello = *hello; $hello = *hello; - my ($err, $x, $X, $status); - + my ($err, $x, $X, $status); + ok( ($x, $err) = new Compress::Raw::Bzip2(0), "Create bzdeflate object" ); ok $x, "Compress::Raw::Bzip2 ok" ; cmp_ok $err, '==', BZ_OK, "status is BZ_OK" ; - + is $x->uncompressedBytes(), 0, "uncompressedBytes() == 0" ; is $x->compressedBytes(), 0, "compressedBytes() == 0" ; @@ -54,38 +54,36 @@ my $len = length $hello ; $Answer = *Answer; $status = $x->bzdeflate($hello, $Answer) ; cmp_ok $status, '==', BZ_RUN_OK, "bzdeflate returned BZ_RUN_OK" ; - + $X = *X; cmp_ok $x->bzflush($X), '==', BZ_RUN_OK, "bzflush returned BZ_RUN_OK" ; $Answer .= $X ; - + is $x->uncompressedBytes(), length $hello, "uncompressedBytes ok" ; is $x->compressedBytes(), length $Answer, "compressedBytes ok" ; - + $X = *X; cmp_ok $x->bzclose($X), '==', BZ_STREAM_END, "bzclose returned BZ_STREAM_END"; $Answer .= $X ; my @Answer = split('', $Answer) ; - + my $k; ok(($k, $err) = new Compress::Raw::Bunzip2(0, 0)); ok $k, "Compress::Raw::Bunzip2 ok" ; cmp_ok $err, '==', BZ_OK, "status is BZ_OK" ; - + is $k->compressedBytes(), 0, "compressedBytes() == 0" ; is $k->uncompressedBytes(), 0, "uncompressedBytes() == 0" ; my $GOT = *GOT; $GOT = *GOT; my $Z; $status = $k->bzinflate($Answer, $GOT) ; - - + + cmp_ok $status, '==', BZ_STREAM_END, "Got BZ_STREAM_END" ; is $GOT, $hello, "uncompressed data matches ok" ; is $k->compressedBytes(), length $Answer, "compressedBytes ok" ; is $k->uncompressedBytes(), length $hello , "uncompressedBytes ok"; } - - diff --git a/cpan/Compress-Raw-Bzip2/t/compress/CompTestUtils.pm b/cpan/Compress-Raw-Bzip2/t/compress/CompTestUtils.pm index c506632f90..fd9d963e03 100644 --- a/cpan/Compress-Raw-Bzip2/t/compress/CompTestUtils.pm +++ b/cpan/Compress-Raw-Bzip2/t/compress/CompTestUtils.pm @@ -9,13 +9,13 @@ use bytes; #use lib qw(t t/compress); use Carp ; -#use Test::More ; +#use Test::More ; sub title { - #diag "" ; + #diag "" ; ok(1, $_[0]) ; #diag "" ; } @@ -26,7 +26,7 @@ sub like_eval } BEGIN { - eval { + eval { require File::Temp; } ; @@ -38,7 +38,7 @@ BEGIN { our ($index); $index = '00000'; - + sub new { my $self = shift ; @@ -72,7 +72,7 @@ BEGIN { $index = '00000'; our ($useTempFile); our ($useTempDir); - + sub new { my $self = shift ; @@ -115,11 +115,11 @@ BEGIN { # autogenerate the name if none supplied $_ = "tmpdir" . $$ . "X" . $index ++ . ".tmp" ; } - foreach (@_) - { + foreach (@_) + { rmtree $_, {verbose => 0, safe => 1} - if -d $_; - mkdir $_, 0777 + if -d $_; + mkdir $_, 0777 } bless [ @_ ], $self ; } @@ -131,10 +131,10 @@ BEGIN { if (! $useTempFile) { my $self = shift ; - foreach (@$self) - { + foreach (@$self) + { rmtree $_, {verbose => 0, safe => 1} - if -d $_ ; + if -d $_ ; } } } @@ -150,15 +150,15 @@ sub readFile { my $pos = tell($f); seek($f, 0,0); - @strings = <$f> ; + @strings = <$f> ; seek($f, 0, $pos); } else { - open (F, "<$f") + open (F, "<$f") or croak "Cannot open $f: $!\n" ; binmode F; - @strings = <F> ; + @strings = <F> ; close F ; } @@ -175,7 +175,7 @@ sub writeFile { my($filename, @strings) = @_ ; 1 while unlink $filename ; - open (F, ">$filename") + open (F, ">$filename") or croak "Cannot open $filename: $!\n" ; binmode F; foreach (@strings) { @@ -191,10 +191,10 @@ sub GZreadFile my ($uncomp) = "" ; my $line = "" ; - my $fil = gzopen($filename, "rb") + my $fil = gzopen($filename, "rb") or croak "Cannopt open '$filename': $Compress::Zlib::gzerrno" ; - $uncomp .= $line + $uncomp .= $line while $fil->gzread($line) > 0; $fil->gzclose ; @@ -248,7 +248,7 @@ sub readHeaderInfo some text EOM - ok my $x = new IO::Compress::Gzip $name, %opts + ok my $x = new IO::Compress::Gzip $name, %opts or diag "GzipError is $IO::Compress::Gzip::GzipError" ; ok $x->write($string) ; ok $x->close ; @@ -562,9 +562,9 @@ sub anyUncompress } my $out = ''; - my $o = new IO::Uncompress::AnyUncompress \$data, - Append => 1, - Transparent => 0, + my $o = new IO::Uncompress::AnyUncompress \$data, + Append => 1, + Transparent => 0, RawInflate => 1, UnLzma => 1, @opts @@ -622,10 +622,10 @@ sub getHeaders } my $out = ''; - my $o = new IO::Uncompress::AnyUncompress \$data, - MultiStream => 1, - Append => 1, - Transparent => 0, + my $o = new IO::Uncompress::AnyUncompress \$data, + MultiStream => 1, + Append => 1, + Transparent => 0, RawInflate => 1, UnLzma => 1, @opts diff --git a/cpan/Compress-Raw-Bzip2/typemap b/cpan/Compress-Raw-Bzip2/typemap index 873681619f..c8a9889291 100644 --- a/cpan/Compress-Raw-Bzip2/typemap +++ b/cpan/Compress-Raw-Bzip2/typemap @@ -30,7 +30,6 @@ T_PTROBJ_AV else if (sv_derived_from($arg, \"${ntype}\")) { IV tmp = SvIV(getInnerObject($arg)) ; $var = INT2PTR($type, tmp); - } else croak(\"$var is not of type ${ntype}\") @@ -49,6 +48,3 @@ T_DUAL T_PV sv_setpv((SV*)$arg, $var); - - - |