r8622 - in /trunk/libdata-serializer-perl: Changes MANIFEST META.yml README debian/changelog lib/Data/Serializer.pm t/04-01-Compress-Zlib.t t/04-02-Compress-PPMd.t t/04-Compression.t t/09-Feature-Combos.t t/serializer-testlib

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Sun Oct 28 17:31:42 UTC 2007


Author: gregoa-guest
Date: Sun Oct 28 17:31:42 2007
New Revision: 8622

URL: http://svn.debian.org/wsvn/?sc=1&rev=8622
Log:
New upstream release.

Added:
    trunk/libdata-serializer-perl/t/04-01-Compress-Zlib.t
      - copied unchanged from r8621, branches/upstream/libdata-serializer-perl/current/t/04-01-Compress-Zlib.t
    trunk/libdata-serializer-perl/t/04-02-Compress-PPMd.t
      - copied unchanged from r8621, branches/upstream/libdata-serializer-perl/current/t/04-02-Compress-PPMd.t
Removed:
    trunk/libdata-serializer-perl/t/04-Compression.t
Modified:
    trunk/libdata-serializer-perl/Changes
    trunk/libdata-serializer-perl/MANIFEST
    trunk/libdata-serializer-perl/META.yml
    trunk/libdata-serializer-perl/README
    trunk/libdata-serializer-perl/debian/changelog
    trunk/libdata-serializer-perl/lib/Data/Serializer.pm
    trunk/libdata-serializer-perl/t/09-Feature-Combos.t
    trunk/libdata-serializer-perl/t/serializer-testlib

Modified: trunk/libdata-serializer-perl/Changes
URL: http://svn.debian.org/wsvn/trunk/libdata-serializer-perl/Changes?rev=8622&op=diff
==============================================================================
--- trunk/libdata-serializer-perl/Changes (original)
+++ trunk/libdata-serializer-perl/Changes Sun Oct 28 17:31:42 2007
@@ -1,4 +1,9 @@
 Revision history for Perl extension Data::Serializer
+
+0.42  Fri Oct  26 2007
+	- Added support for Compress::PPMd
+		Thanks to Strzelecki Łukasz <strzelecki at rswsystems.pl> for recommending the addition
+		as well as supplying relevant code samples.
 
 0.41  Wed May  17 2007
 	- Bowing to peer pressure and adding in the Test::Pod stuff in production, this means adding a prereq of Test::More

Modified: trunk/libdata-serializer-perl/MANIFEST
URL: http://svn.debian.org/wsvn/trunk/libdata-serializer-perl/MANIFEST?rev=8622&op=diff
==============================================================================
--- trunk/libdata-serializer-perl/MANIFEST (original)
+++ trunk/libdata-serializer-perl/MANIFEST Sun Oct 28 17:31:42 2007
@@ -34,7 +34,8 @@
 t/01-13-JSON-Syck.t
 t/02-Raw.t
 t/03-Non-Portable.t
-t/04-Compression.t
+t/04-01-Compress-Zlib.t
+t/04-02-Compress-PPMd.t
 t/05-Encryption.t
 t/06-B64-Encoding.t
 t/07-01-MD5-Digest.t

Modified: trunk/libdata-serializer-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libdata-serializer-perl/META.yml?rev=8622&op=diff
==============================================================================
--- trunk/libdata-serializer-perl/META.yml (original)
+++ trunk/libdata-serializer-perl/META.yml Sun Oct 28 17:31:42 2007
@@ -1,9 +1,9 @@
 --- #YAML:1.0
 name:                Data-Serializer
-version:             0.41
+version:             0.42
 abstract:            ~
 license:             perl
-generated_by:        ExtUtils::MakeMaker version 6.32
+generated_by:        ExtUtils::MakeMaker version 6.36
 distribution_type:   module
 requires:     
     Data::Dumper:                  2.08

Modified: trunk/libdata-serializer-perl/README
URL: http://svn.debian.org/wsvn/trunk/libdata-serializer-perl/README?rev=8622&op=diff
==============================================================================
--- trunk/libdata-serializer-perl/README (original)
+++ trunk/libdata-serializer-perl/README Sun Oct 28 17:31:42 2007
@@ -134,9 +134,7 @@
         part of data verification.
 
     compressor - changes compresing module
-        This method is included for possible future inclusion of alternate
-        compression method Currently Compress::Zlib is the only supported
-        compressor.
+        Currently Compress::Zlib and Compress::PPMd are the only options
 
     encoding - change encoding method
         Encodes data structure in ascii friendly manner. Currently the only
@@ -230,11 +228,12 @@
     would be useful to explore further. Volunteers for putting this together
     would be welcome.
 
-COPYRIGHT
-    Copyright (c) 2001-2006 Neil Neely. All rights reserved.
-
-    This program is free software; you can redistribute it and/or modify it
-    under the same terms as Perl itself.
+COPYRIGHT AND LICENSE
+    Copyright (c) 2001-2007 Neil Neely. All rights reserved.
+
+    This library is free software; you can redistribute it and/or modify it
+    under the same terms as Perl itself, either Perl version 5.8.2 or, at
+    your option, any later version of Perl 5 you may have available.
 
     See http://www.perl.com/language/misc/Artistic.html
 

Modified: trunk/libdata-serializer-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libdata-serializer-perl/debian/changelog?rev=8622&op=diff
==============================================================================
--- trunk/libdata-serializer-perl/debian/changelog (original)
+++ trunk/libdata-serializer-perl/debian/changelog Sun Oct 28 17:31:42 2007
@@ -1,10 +1,11 @@
-libdata-serializer-perl (0.41-2) UNRELEASED; urgency=low
+libdata-serializer-perl (0.41-3) UNRELEASED; urgency=low
 
+  * New upstream release.
   * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
     field (source stanza); Homepage field (source stanza). Removed: XS-
     Vcs-Svn fields.
 
- -- gregor herrmann <gregor+debian at comodo.priv.at>  Tue, 09 Oct 2007 22:28:34 +0200
+ -- gregor herrmann <gregor+debian at comodo.priv.at>  Sun, 28 Oct 2007 18:30:14 +0100
 
 libdata-serializer-perl (0.41-1) unstable; urgency=low
 

Modified: trunk/libdata-serializer-perl/lib/Data/Serializer.pm
URL: http://svn.debian.org/wsvn/trunk/libdata-serializer-perl/lib/Data/Serializer.pm?rev=8622&op=diff
==============================================================================
--- trunk/libdata-serializer-perl/lib/Data/Serializer.pm (original)
+++ trunk/libdata-serializer-perl/lib/Data/Serializer.pm Sun Oct 28 17:31:42 2007
@@ -17,7 +17,7 @@
 @EXPORT = qw( );
 @EXPORT_OK = qw( );
 
-$VERSION = '0.41';
+$VERSION = '0.42';
 
 # Preloaded methods go here.
 {
@@ -380,8 +380,7 @@
 
 =item B<compressor> - changes compresing module
 
-This method is included for possible future inclusion of alternate compression method
-Currently Compress::Zlib is the only supported compressor.
+Currently Compress::Zlib and Compress::PPMd are the only options
 
 =item B<encoding> - change encoding method
 
@@ -484,12 +483,14 @@
 
 
 
-=head1 COPYRIGHT
-
-Copyright (c) 2001-2006 Neil Neely.  All rights reserved.
-
-This program is free software; you can redistribute it
-and/or modify it under the same terms as Perl itself.
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (c) 2001-2007 Neil Neely.  All rights reserved.
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself, either Perl version 5.8.2 or,
+at your option, any later version of Perl 5 you may have available.
+
 
 See http://www.perl.com/language/misc/Artistic.html
 
@@ -537,6 +538,8 @@
 =item L<JSON::Syck(3)>
 
 =item L<Compress::Zlib(3)>
+
+=item L<Compress::PPMd(3)>
 
 =item L<Digest(3)>
 
@@ -565,12 +568,22 @@
 sub _compress {
   my $self = (shift);
   $self->_module_loader($self->compressor);	
-  return Compress::Zlib::compress((shift));
+  if ($self->compressor eq 'Compress::Zlib') {
+    return Compress::Zlib::compress((shift));
+  } elsif ($self->compressor eq 'Compress::PPMd') {
+    my $compressor = Compress::PPMd::Encoder->new();
+    return $compressor->encode((shift));
+  }
 }
 sub _decompress {
   my $self = (shift);
   $self->_module_loader($self->compressor);	
-  return Compress::Zlib::uncompress((shift));
+  if ($self->compressor eq 'Compress::Zlib') {
+    return Compress::Zlib::uncompress((shift));
+  } elsif ($self->compressor eq 'Compress::PPMd') {
+    my $compressor = Compress::PPMd::Decoder->new();
+    return $compressor->decode((shift));
+  }
 }
 
 sub _create_token {

Modified: trunk/libdata-serializer-perl/t/09-Feature-Combos.t
URL: http://svn.debian.org/wsvn/trunk/libdata-serializer-perl/t/09-Feature-Combos.t?rev=8622&op=diff
==============================================================================
--- trunk/libdata-serializer-perl/t/09-Feature-Combos.t (original)
+++ trunk/libdata-serializer-perl/t/09-Feature-Combos.t Sun Oct 28 17:31:42 2007
@@ -23,7 +23,7 @@
 
 $T->msg("No serializers found!!") unless (@serializers);
 
-my @types = qw(raw basic non-portable encoding encryption compression storage);
+my @types = qw(raw basic non-portable encoding encryption compresszlib compressppmd storage);
 
 find_features($T, at types);
 
@@ -32,23 +32,39 @@
 push(@feature_combos, "non-portable encryption") 
 	if ($found_type{'encryption'});
 
-push(@feature_combos, "non-portable compression") 
-	if ($found_type{'compression'});
+push(@feature_combos, "non-portable compresszlib") 
+	if ($found_type{'compresszlib'});
 
-if ($found_type{'compression'} && $found_type{'encryption'}) {
-  push(@feature_combos, "encryption compression");
-  push(@feature_combos, "non-portable encryption compression");
+push(@feature_combos, "non-portable compressppmd") 
+	if ($found_type{'compressppmd'});
+
+if ($found_type{'compresszlib'} && $found_type{'encryption'}) {
+  push(@feature_combos, "encryption compresszlib");
+  push(@feature_combos, "non-portable encryption compresszlib");
 }
 
-push(@feature_combos, "encoding compression")
-	if ($found_type{'compression'} && $found_type{'encoding'});
+if ($found_type{'compressppmd'} && $found_type{'encryption'}) {
+  push(@feature_combos, "encryption compressppmd");
+  push(@feature_combos, "non-portable encryption compressppmd");
+}
 
-push(@feature_combos, "encoding encryption compression")
-	if ($found_type{'compression'} && $found_type{'encryption'} && $found_type{'encoding'});
+push(@feature_combos, "encoding compresszlib")
+	if ($found_type{'compresszlib'} && $found_type{'encoding'});
 
-push(@feature_combos, "encoding encryption compression storage")
-	if ($found_type{'compression'} && $found_type{'encryption'} && $found_type{'encoding'} && $found_type{'storage'});
+push(@feature_combos, "encoding compressppmd")
+	if ($found_type{'compressppmd'} && $found_type{'encoding'});
 
+push(@feature_combos, "encoding encryption compresszlib")
+	if ($found_type{'compresszlib'} && $found_type{'encryption'} && $found_type{'encoding'});
+
+push(@feature_combos, "encoding encryption compressppmd")
+	if ($found_type{'compressppmd'} && $found_type{'encryption'} && $found_type{'encoding'});
+
+push(@feature_combos, "encoding encryption compresszlib storage")
+	if ($found_type{'compresszlib'} && $found_type{'encryption'} && $found_type{'encoding'} && $found_type{'storage'});
+
+push(@feature_combos, "encoding encryption compressppmd storage")
+	if ($found_type{'compressppmd'} && $found_type{'encryption'} && $found_type{'encoding'} && $found_type{'storage'});
 
 my $testcount = 0;
 

Modified: trunk/libdata-serializer-perl/t/serializer-testlib
URL: http://svn.debian.org/wsvn/trunk/libdata-serializer-perl/t/serializer-testlib?rev=8622&op=diff
==============================================================================
--- trunk/libdata-serializer-perl/t/serializer-testlib (original)
+++ trunk/libdata-serializer-perl/t/serializer-testlib Sun Oct 28 17:31:42 2007
@@ -239,7 +239,8 @@
                 'cgopt'     	 => [],
                 'xmldumpopt'   	 => [],
                 'encryption'     => [qw (Crypt::CBC Crypt::Blowfish)],
-                'compression'    => [qw (Compress::Zlib)],
+                'compresszlib'    => [qw (Compress::Zlib)],
+                'compressppmd'    => [qw (Compress::PPMd)],
                 'encoding'       => [qw (MIME::Base64)],
                 'md5'       => [qw (Crypt::CBC Crypt::Blowfish Digest::MD5)],
                 'sha1'     	 => [qw (Crypt::CBC Crypt::Blowfish Digest::SHA1)],
@@ -272,9 +273,14 @@
 			#only relevant if we have a secret
                         $obj->secret('test');
                         $obj->digester('SHA-256');
-                } elsif ($feature eq 'compression') {
-                        # use compression (Compress::Zlib)
+                } elsif ($feature eq 'compresszlib') {
+                        # use compression 
                         $obj->compress(1);
+                        $obj->compressor("Compress::Zlib");
+                } elsif ($feature eq 'compressppmd') {
+                        # use compression 
+                        $obj->compress(1);
+                        $obj->compressor("Compress::PPMd");
                 } elsif ($feature eq 'encoding') {
                         # test alternate encoding
                         $obj->encoding('b64');




More information about the Pkg-perl-cvs-commits mailing list