The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Changes 013
MANIFEST 11
META.json 34
META.yml 1516
Makefile.PL 13
README 940
README.md 0101
SIGNATURE 1111
lib/Compress/Bzip2.pm 5057
9 files changed (This is a version diff) 175206
@@ -154,3 +154,16 @@ in a lot of places.
 
 2.17 2013-08-28 rurban
    - Fixed license in README (thanks to John Peacock)
+
+2.18 2014-08-06 rurban
+   - [cpan #68572] add ccdlflags for show_bzversion missing -R also, similar to the
+     fix in 2.11. Not a EUMM bug.
+   - require constant 1.04 (since 5.8) to accept hashrefs.
+   - add META to MANIFEST
+
+2.19 2015-10-24 rurban
+   - fixed generated SIGNATURE (EUMM parallel make issue)
+
+2.20 2015-01-15 rurban
+   - Convert README to markdown, mention the preferred IO::Compress::Bzip2 in
+     the docs (done by Pattarawat Chormai, GH PR #2)
@@ -1,4 +1,4 @@
-README
+README.md
 Changes
 MANIFEST
 COPYING
@@ -4,7 +4,7 @@
       "Rob Janes <arjay@cpan.org>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.131560",
+   "generated_by" : "ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.143240",
    "license" : [
       "perl_5"
    ],
@@ -43,7 +43,8 @@
             "File::Copy" : "0",
             "File::Spec" : "0",
             "Getopt::Std" : "0",
-            "Test::More" : "0"
+            "Test::More" : "0",
+            "constant" : "1.04"
          }
       }
    },
@@ -56,5 +57,5 @@
          "url" : "https://github.com/rurban/Compress-Bzip2"
       }
    },
-   "version" : "2.17"
+   "version" : "2.20"
 }
@@ -3,33 +3,34 @@ abstract: 'Interface to Bzip2 compression library'
 author:
   - 'Rob Janes <arjay@cpan.org>'
 build_requires:
-  ExtUtils::MakeMaker: 0
+  ExtUtils::MakeMaker: '0'
 configure_requires:
-  ExtUtils::MakeMaker: 0
+  ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.131560'
+generated_by: 'ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.143240'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+  version: '1.4'
 name: Compress-Bzip2
 no_index:
   directory:
     - t
     - inc
 recommends:
-  Compress::Raw::Bzip2: 2.060
-  Compress::Zlib: 1.19
-  IO::Compress::Bzip2: 2.060
+  Compress::Raw::Bzip2: '2.060'
+  Compress::Zlib: '1.19'
+  IO::Compress::Bzip2: '2.060'
 requires:
-  Carp: 0
-  Config: 0
-  Fcntl: 0
-  File::Copy: 0
-  File::Spec: 0
-  Getopt::Std: 0
-  Test::More: 0
+  Carp: '0'
+  Config: '0'
+  Fcntl: '0'
+  File::Copy: '0'
+  File::Spec: '0'
+  Getopt::Std: '0'
+  Test::More: '0'
+  constant: '1.04'
 resources:
   license: http://dev.perl.org/licenses/
   repository: https://github.com/rurban/Compress-Bzip2
-version: 2.17
+version: '2.20'
@@ -30,6 +30,7 @@ WriteMakefile(
   NAME              => 'Compress::Bzip2',
   VERSION_FROM      => $Bzip2{pm},
   PREREQ_PM         => {
+    'constant'   => 1.04, # for constant => {}
     'Test::More' => 0,
     'File::Spec' => 0,
     'File::Copy' => 0,
@@ -43,7 +44,7 @@ WriteMakefile(
    (ABSTRACT_FROM  => $Bzip2{pm},
     AUTHOR         => 'Rob Janes <arjay@cpan.org>') : ()),
   LIBS             => $BUILD_BZLIB ? [] : [ $BZLIB_LIB ? "-L$BZLIB_LIB -lbz2" : '-lbz2' ],
-  # EUMM bug #84345 missing -R
+  # ccdlflags needed for -R [cpan #68572]
   LDDLFLAGS         => $Config{lddlflags} . " " . $Config{ccdlflags},
   INC               => $BUILD_BZLIB ? '-Ibzlib-src' : $BZLIB_INCLUDE ? "-I$BZLIB_INCLUDE" : '',
   clean             => {
@@ -172,6 +173,7 @@ sub ParseCONFIG {
     my $command = $Config{cc} .
 	' '. $Config{ccflags} .
 	( $BZLIB_INCLUDE ? " -I$BZLIB_INCLUDE" : '' ) .
+	' '. $Config{ccdlflags} .
 	' '. $Config{ldflags} .
 	' -o show_bzversion show_bzversion.c' .
 	( $BZLIB_LIB ? " -L$BZLIB_LIB" : '' ) .
@@ -1,94 +0,0 @@
-
-Compress::Bzip2
-
-Version 2.17
-
-2013-08-28
-
-The subdirectory bzlib-src contains almost all of the files from the
-1.0.6 distribution of bzip2.  What's missing is that I only included
-the html flavour of the documentation.  See the README in there for
-more information.
-
-DESCRIPTION
-===========
-
-This module provides a Perl interface to the bzip2 compression algorithms.
-It uses the low level interface to the algorithm, and reimplements all
-high level routines.
-
-What is Bzip2 ?
-===============
-Bzip2 is a portable lossless data compression library written in ANSI C.
-It offers pretty fast compression and fast decompression.
-Bzip2 has very good results, if you want to compress ASCII Documents.
-
-Bzip2 is probably not great for streaming compression.  It fills it's
-internal buffer, which depending of parameters is between 100k and 900k
-in size, before it outputs ANY compressed data.  It works best compressing
-an entire document.
-
-Streaming decompression on the other hand, gives a steady torrent of bytes.
-
-What is Compress::Bzip2 ?
-====================
-Compress::Bzip2 provided early Bzip2 bindings for Perl5 compatible to
-the old Compress::Zlib library. See Compress::Raw::Bzip2 for the new API
-compatible with IO::Compress.
-
-It's my intent to make this package like the Compress::Zlib package, so
-that code that uses one can fairly easily use the other.  The perlxs stuff
-that's visible to perl has methods that have the same names as their
-Compress::Zlib counterparts, except that the "g" is changed to a "b".
-
-Most code that uses Compress::Zlib should be able to use this package.
-Simply change
-
-   $gz = Compress::Zlib::gzopen( "filename", "w" );
-
-to
-
-   $gz = Compress::Bzip2::gzopen( "filename", "w" );
-
-I made aliases of all the Compress::Zlib functions.  Some of them don't
-return anything useful, like crc32 or adler32, cause bzip2 doesn't
-do that sort of thing.  Take a look at t/070-gzcomp.t and t/071-gzuncomp.t.
-
-Bug fixes and other feedback are welcome.
-
-Copyright
-=========
-bzip2
-Julian Seward, j s e w a r d   a t   a c m . o r g
-
-Compress-Bzip2 prior to 2.0 is distributed under the terms of the
-GNU General Public License (GPL).  See the file COPYING.
-
-Since version 2.0 Compress-Bzip2 is dual-licensed.
-You can redistribute it and/or modify it under the same terms as Perl
-itself, either Perl version 5.8.3 or, at your option, any later
-version of Perl 5 you may have available.
-
-
-Many Thanks to:
-===============
-
-Author of bzip2:
-Julian Seward, j s e w a r d   a t   a c m . o r g
-Cambridge, UK
-http://sources.redhat.com/bzip2
-
-Author of Compress::Zlib:
-Paul Marquess, p m q s   a t   c p a n . o r g
-http://www.cpan.org
-
-Author of 1.x Compress::Bzip2 (1999)
-Gawdi Azem <azemgi@rupert.informatik.uni-stuttgart.de>
-(last known email, no longer valid)
-
-Sisyphus, helped out with win32 compatibility
-s i s y p h u s 1   a t   o p t u s n e t . c o m . a u
-
-Marco "Kiko" Carnut, author of Compress::Bzip2 1.03
-k i k o   a t   t e m p e s t . c o m . b r
-
@@ -0,0 +1,101 @@
+
+# Compress::Bzip2
+
+### DESCRIPTION
+
+This module provides a Compress::Zlib like Perl interface to the bzip2
+library.  It uses the low level interface to the bzip2 algorithm, and
+reimplements all high level routines.
+
+### What is Bzip2 ?
+
+bzip2 is a portable lossless data compression library written in ANSI C.
+It offers pretty fast compression and fast decompression.
+bzip2 has very good results, if you want to compress ASCII Documents.
+
+bzip2 is probably not great for streaming compression.  It fills it's
+internal buffer, which depending of parameters is between 100k and 900k
+in size, before it outputs ANY compressed data.  It works best compressing
+an entire document.
+
+Streaming decompression on the other hand, gives a steady torrent of bytes.
+
+### What is Compress::Bzip2 ?
+
+Compress::Bzip2 provided early bzip2 bindings for Perl5 compatible to
+the old Compress::Zlib library. See Compress::Raw::Bzip2 for the new API
+compatible with IO::Compress.
+
+It's my intent to make this package like the Compress::Zlib package, so
+that code that uses one can fairly easily use the other.  The perlxs stuff
+that's visible to perl has methods that have the same names as their
+Compress::Zlib counterparts, except that the "g" is changed to a "b".
+
+Most code that uses Compress::Zlib should be able to use this package.
+Simply change
+```
+
+   $gz = Compress::Zlib::gzopen( "filename", "w" );
+   
+```
+
+to
+```
+
+   $gz = Compress::Bzip2::gzopen( "filename", "w" );
+  ```
+
+I made aliases of all the Compress::Zlib functions.  Some of them don't
+return anything useful, like crc32 or adler32, cause bzip2 doesn't
+do that sort of thing.  Take a look at t/070-gzcomp.t and t/071-gzuncomp.t.
+
+Bug fixes and other feedback are welcome.
+
+### Copyright
+
+bzip2
+
+**Julian Seward**, j s e w a r d   a t   a c m . o r g
+
+Compress-Bzip2 prior to 2.0 is distributed under the terms of the
+GNU General Public License (GPL).  See the file COPYING.
+
+Since version 2.0 Compress-Bzip2 is dual-licensed.
+You can redistribute it and/or modify it under the same terms as Perl
+itself, either Perl version 5.8.3 or, at your option, any later
+version of Perl 5 you may have available.
+
+
+### Many Thanks to:
+
+
+**Author of bzip2**
+
+Julian Seward, j s e w a r d   a t   a c m . o r g
+
+Cambridge, UK
+
+http://sources.redhat.com/bzip2
+
+**Author of Compress::Zlib**
+
+Paul Marquess, p m q s   a t   c p a n . o r g
+
+http://www.cpan.org
+
+**Author of 1.x Compress::Bzip2 (1999)**
+
+Gawdi Azem <azemgi@rupert.informatik.uni-stuttgart.de>
+
+(last known email, no longer valid)
+
+**Helped out with win32 compatibility**
+
+Sisyphus, s i s y p h u s 1   a t   o p t u s n e t . c o m . a u
+
+**Author of Compress::Bzip2 1.03**
+
+Marco "Kiko" Carnut,
+ 
+k i k o   a t   t e m p e s t . c o m . b r
+
@@ -17,14 +17,14 @@ Hash: SHA1
 SHA1 321030dcade0d87dba537aff99fcba66230971d0 ANNOUNCE
 SHA1 d8094d7a2ccce1ff3a3fc69a76c73dd15291cc65 Bzip2.xs
 SHA1 ff8688f52f05aa77ac2522c7970e6ab23bf77d0e COPYING
-SHA1 34d0cd033b45d10f7202b6c45bbc46e34b3928ea Changes
+SHA1 3a222be72665a3e8fe654dd2e7b38ce6c2bd8dae Changes
 SHA1 06186a4d62ebec3ffac9a4f5457458436d7302c5 INSTALL
-SHA1 dd1e07a034c254f94c1ee14562aeac83a653d3b1 MANIFEST
-SHA1 d98cd84034af6fc7a56f77ebd5e5fbc4a5ab636d META.json
-SHA1 555572c6f28761ac08fc62423188af180c89a2e9 META.yml
-SHA1 37454ac6a9d9000cf85c79514e6a0344da309a1e Makefile.PL
+SHA1 f90f22c21711a4fbcc955998aa47179aac5a32b2 MANIFEST
+SHA1 9f26400242189eaa6c9a0cd003033aae44c0f321 META.json
+SHA1 4d08319df67e788b3fd37063e8d91f2df3928c89 META.yml
+SHA1 3711bef030207705a281125394be7eb9627a79a3 Makefile.PL
 SHA1 01ca12f980ac0675ebc82d84c432bbf3be80c74c NEWS
-SHA1 53f65a059d9303153d8b54300636fbd81560e639 README
+SHA1 8343eaf8bfc7836c110d55b878ce13b9b56dd468 README.md
 SHA1 6bdb898b814cca277ba465b15a14eb50bc458ea8 bzlib-src/CHANGES
 SHA1 1c0c6888759a63c32bca7eb63353af2cd9bd5d9e bzlib-src/LICENSE
 SHA1 ec798819dffc496d45bab5ee665eabcc6b141c5d bzlib-src/Makefile.PL
@@ -89,7 +89,7 @@ SHA1 b7413608a39898b0e9f5009e2f32ad7e3356956d bzlib-src/xmlproc.sh
 SHA1 7dfc2194e9b344251a52ae5b6399fb1650342905 config.in
 SHA1 f51e8905cd4c7ac9abe672ead1f8a52b82fbbad5 fallback/const-c.inc
 SHA1 340a622d47ec2642d9631c79432f1c234a6c8c84 fallback/const-xs.inc
-SHA1 81020db2b7eebabde63d31b00541c9a146b79af0 lib/Compress/Bzip2.pm
+SHA1 02639505d77fbc88e0f0bec7dbb2e52acf1db01b lib/Compress/Bzip2.pm
 SHA1 fb7154b5f5ab3dd33064a2a1ac704f596dc6449a ppport.h
 SHA1 f5620dc7bc334bd571a5bceb7012cc11114cccff show_bzversion.c
 SHA1 4dd4bbbd10e755857ed1ca2beabfa6410c8ef2ca t/010-useability.t
@@ -126,9 +126,9 @@ SHA1 8e6c77dd1d7e2bb99d62e199e1b19b6090e405f5 t/900_pod.t
 SHA1 c77d252511eb0f1ec5403322cb21ce00ccce5aff t/lib.pl
 SHA1 d247f2120895e2fdcd1ea6e65bab1a1f68c06714 typemap
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.14 (GNU/Linux)
+Version: GnuPG v1
 
-iEYEARECAAYFAlIeHGgACgkQmm2SYo/9yUJ5bgCdGfb5MXu9B2GYIKFFFz0958n+
-bb0AnRbVm4NLe8woVJ/gvfmTigNC9UdO
-=Un13
+iEYEARECAAYFAlS3jHAACgkQmm2SYo/9yUKNDQCeIhPLl83XTBmtcArVzJJDVTFs
+gPkAn3sUL7kHqGFYL8OHhqB9iMH0+hUz
+=z9XC
 -----END PGP SIGNATURE-----
@@ -1,8 +1,8 @@
 # File	   : Bzip2.pm
 # Author   : Rob Janes
 # Created  : 14 April 2005
-# Modified : 2013-08-28 10:44:01 rurban
-# Version  : 2.17
+# Modified : 2015-01-15 rurban
+# Version  : 2.20
 #
 #     Copyright (c) 2005 Rob Janes. All rights reserved.
 #     This program is free software; you can redistribute it and/or
@@ -12,7 +12,7 @@
 package Compress::Bzip2;
 
 use 5.006;
-our $VERSION = "2.17";
+our $VERSION = "2.20";
 use strict;
 use warnings;
 
@@ -360,7 +360,7 @@ sub _process_files ( @ ) {
 	print STDERR "Error: failed to stat $infile: '$!'\n";
 	next;
       }
-      
+
       if ( !_check_stat( $infile, \@statbuf, $opts{f} ) ) {
 	print STDERR "Error: file $infile stat check fails: $bzerrno\n";
 	next;
@@ -383,7 +383,7 @@ sub _process_files ( @ ) {
 	next;
       }
     }
-    
+
     if ( !$read_from_stdin ) {
       undef $in;
       if ( !open( $in, $infile ) ) {
@@ -445,7 +445,7 @@ sub _process_files ( @ ) {
     }
   }
 }
-  
+
 ##############################################################################
 ##############################################################################
 ## compatibility with Compress::Bzip2 1.03
@@ -705,7 +705,7 @@ Compress::Bzip2 - Interface to Bzip2 compression library
     $bytesread = $bz->bzread($buffer [,$size]) ;
     $bytesread = $bz->bzreadline($line);
     $byteswritten = $bz->bzwrite($buffer [,$limit]);
-    $errstring = $bz->bzerror(); 
+    $errstring = $bz->bzerror();
     $status = $bz->bzeof();
     $status = $bz->bzflush();
     $status = $bz->bzclose() ;
@@ -721,9 +721,9 @@ Compress::Bzip2 - Interface to Bzip2 compression library
 
 =head1 DESCRIPTION
 
-The I<Compress::Bzip2> module provides a Perl interface to the I<Bzip2>
+The I<Compress::Bzip2> module provides a Perl interface to the B<bzip2>
 compression library (see L</AUTHOR> for details about where to get
-I<Bzip2>). A relevant subset of the functionality provided by I<Bzip2>
+I<Bzip2>). A relevant subset of the functionality provided by I<bzip2>
 is available in I<Compress::Bzip2>.
 
 All string parameters can either be a scalar or a scalar reference.
@@ -732,6 +732,13 @@ The module can be split into two general areas of functionality, namely
 in-memory compression/decompression and read/write access to I<bzip2>
 files. Each of these areas will be discussed separately below.
 
+B<NOTE>
+
+I<Compress::Bzip2> is just a simple I<bzip2> binding, comparable to the
+old L<Compress::Zlib> library. It is not well integrated into PerlIO,
+use the preferred L<IO::Compress::Bzip2> instead.
+
+
 =head1 FILE READ/WRITE INTERFACE
 
 A number of functions are supplied in I<bzlib> for reading and writing
@@ -776,7 +783,7 @@ the case of an error, -1.
 
 =head2 B<$bytesread = $bz-E<gt>bzreadline($line) ;>
 
-Reads the next line from the compressed file into B<$line>. 
+Reads the next line from the compressed file into B<$line>.
 
 Returns the number of bytes actually read. On EOF it returns 0 and in
 the case of an error, -1.
@@ -1155,7 +1162,7 @@ The buffer parameter can either be a scalar or a scalar reference. The
 contents of the buffer parameter are destroyed after calling this
 function.
 
-=head1 STREAM DEFLATE 
+=head1 STREAM DEFLATE
 
 The Perl interface will I<always> consume the complete input buffer
 before returning. Also the output buffer returned will be
@@ -1165,7 +1172,7 @@ Here is a definition of the interface available:
 
 =head2 B<($d, $status) = bzdeflateInit( [PARAMS] )>
 
-Initialises a deflation stream. 
+Initialises a deflation stream.
 
 If successful, it will return the initialised deflation stream, B<$d>
 and B<$status> of C<BZ_OK> in a list context. In scalar context it
@@ -1282,18 +1289,18 @@ input, deflates it and writes it to standard output.
     while (<>)
     {
         ($output, $status) = $x->bzdeflate($_) ;
-    
+
         $status == BZ_OK
             or die "deflation failed\n" ;
-    
+
         print $output ;
     }
-    
+
     ($output, $status) = $x->bzclose() ;
-    
+
     $status == BZ_OK
         or die "deflation failed\n" ;
-    
+
     print $output ;
 
 =head1 STREAM INFLATE
@@ -1302,7 +1309,7 @@ Here is a definition of the interface:
 
 =head2 B<($i, $status) = inflateInit()>
 
-Initialises an inflation stream. 
+Initialises an inflation stream.
 
 In a list context it returns the inflation stream, B<$i>, and the
 I<zlib> status code (B<$status>). In a scalar context it returns the
@@ -1371,27 +1378,27 @@ Here is an example of using B<bzinflate>.
 
     use strict ;
     use warnings ;
-    
+
     use Compress::Bzip2;
-    
+
     my $x = bzinflateInit()
        or die "Cannot create a inflation stream\n" ;
-    
+
     my $input = '' ;
     binmode STDIN;
     binmode STDOUT;
-    
+
     my ($output, $status) ;
     while (read(STDIN, $input, 4096))
     {
         ($output, $status) = $x->bzinflate(\$input) ;
-    
-        print $output 
+
+        print $output
             if $status == BZ_OK or $status == BZ_STREAM_END ;
-    
+
         last if $status != BZ_OK ;
     }
-    
+
     die "inflation failed\n"
         unless $status == BZ_STREAM_END ;
 
@@ -1403,24 +1410,24 @@ Here are some example scripts of using the interface.
 
   use strict ;
   use warnings ;
-    
+
   use Compress::Bzip2 ;
-    
+
   die "Usage: bzcat file...\n" unless @ARGV ;
-    
+
   my $file ;
-    
+
   foreach $file (@ARGV) {
     my $buffer ;
-    
-    my $bz = bzopen($file, "rb") 
+
+    my $bz = bzopen($file, "rb")
        or die "Cannot open $file: $bzerrno\n" ;
-    
+
     print $buffer while $bz->bzread($buffer) > 0 ;
-    
-    die "Error reading from $file: $bzerrno" . ($bzerrno+0) . "\n" 
+
+    die "Error reading from $file: $bzerrno" . ($bzerrno+0) . "\n"
        if $bzerrno != BZ_STREAM_END ;
-        
+
     $bz->bzclose() ;
   }
 
@@ -1428,26 +1435,26 @@ Here are some example scripts of using the interface.
 
   use strict ;
   use warnings ;
-    
+
   use Compress::Bzip2 ;
-    
+
   die "Usage: bzgrep pattern file...\n" unless @ARGV >= 2;
-    
+
   my $pattern = shift ;
-    
+
   my $file ;
-    
+
   foreach $file (@ARGV) {
-    my $bz = bzopen($file, "rb") 
+    my $bz = bzopen($file, "rb")
        or die "Cannot open $file: $bzerrno\n" ;
-    
+
     while ($bz->bzreadline($_) > 0) {
       print if /$pattern/ ;
     }
-    
-    die "Error reading from $file: $bzerrno\n" 
+
+    die "Error reading from $file: $bzerrno\n"
       if $bzerrno != Z_STREAM_END ;
-        
+
     $bz->bzclose() ;
   }
 
@@ -1459,14 +1466,14 @@ output.
 
   use strict ;
   use warnings ;
-    
+
   use Compress::Bzip2 ;
-    
+
   binmode STDOUT;	# bzopen only sets it on the fd
-    
+
   my $bz = bzopen(\*STDOUT, "wb")
      or die "Cannot open stdout: $bzerrno\n" ;
-    
+
   while (<>) {
     $bz->bzwrite($_) or die "error writing: $bzerrno\n" ;
   }