r8620 - in /branches/upstream/libdata-serializer-perl/current: Changes MANIFEST META.yml README 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:30:10 UTC 2007


Author: gregoa-guest
Date: Sun Oct 28 17:30:09 2007
New Revision: 8620

URL: http://svn.debian.org/wsvn/?sc=1&rev=8620
Log:
[svn-upgrade] Integrating new upstream version, libdata-serializer-perl (0.42)

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

Modified: branches/upstream/libdata-serializer-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-serializer-perl/current/Changes?rev=8620&op=diff
==============================================================================
--- branches/upstream/libdata-serializer-perl/current/Changes (original)
+++ branches/upstream/libdata-serializer-perl/current/Changes Sun Oct 28 17:30:09 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: branches/upstream/libdata-serializer-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-serializer-perl/current/MANIFEST?rev=8620&op=diff
==============================================================================
--- branches/upstream/libdata-serializer-perl/current/MANIFEST (original)
+++ branches/upstream/libdata-serializer-perl/current/MANIFEST Sun Oct 28 17:30:09 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: branches/upstream/libdata-serializer-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-serializer-perl/current/META.yml?rev=8620&op=diff
==============================================================================
--- branches/upstream/libdata-serializer-perl/current/META.yml (original)
+++ branches/upstream/libdata-serializer-perl/current/META.yml Sun Oct 28 17:30:09 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: branches/upstream/libdata-serializer-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-serializer-perl/current/README?rev=8620&op=diff
==============================================================================
--- branches/upstream/libdata-serializer-perl/current/README (original)
+++ branches/upstream/libdata-serializer-perl/current/README Sun Oct 28 17:30:09 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: branches/upstream/libdata-serializer-perl/current/lib/Data/Serializer.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-serializer-perl/current/lib/Data/Serializer.pm?rev=8620&op=diff
==============================================================================
--- branches/upstream/libdata-serializer-perl/current/lib/Data/Serializer.pm (original)
+++ branches/upstream/libdata-serializer-perl/current/lib/Data/Serializer.pm Sun Oct 28 17:30:09 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 {

Added: branches/upstream/libdata-serializer-perl/current/t/04-01-Compress-Zlib.t
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-serializer-perl/current/t/04-01-Compress-Zlib.t?rev=8620&op=file
==============================================================================
--- branches/upstream/libdata-serializer-perl/current/t/04-01-Compress-Zlib.t (added)
+++ branches/upstream/libdata-serializer-perl/current/t/04-01-Compress-Zlib.t Sun Oct 28 17:30:09 2007
@@ -1,0 +1,57 @@
+use lib "./t";             # to pick up a ExtUtils::TBone
+
+
+require "./t/serializer-testlib";
+
+use Data::Serializer; 
+
+use ExtUtils::TBone;
+
+my $T = typical ExtUtils::TBone;                 # standard log
+
+
+	
+my @serializers;
+
+foreach my $serializer (keys %serializers) {
+	if (eval "require $serializer") {
+		$T->msg("Found serializer $serializer");  
+		push(@serializers, $serializer);
+	}
+}
+
+
+$T->msg("No serializers found!!") unless (@serializers);
+
+my @types = qw(compresszlib);
+
+find_features($T, at types);
+
+my $testcount = 0;
+
+foreach my $serializer (@serializers) {
+	while (my ($test,$value) = each %{$serializers{$serializer}}) {
+		next unless $value;
+		foreach my $type (@types) {
+			next unless $found_type{$type}; 
+                        $testcount += $value;
+                }
+        }
+}
+unless ($testcount) {
+        $T->begin("0 # Skipped:  @types not installed");
+        exit;
+}
+$T->begin($testcount);
+$T->msg("Begin Testing for @types");  # message for the log
+
+foreach my $serializer (@serializers) {
+	while (my ($test,$value) = each %{$serializers{$serializer}}) {
+		next unless $value;
+		foreach my $type (@types) {
+			next unless $found_type{$type}; 
+                	run_test($T,$serializer,$test,$type);
+                }
+        }
+}
+

Added: branches/upstream/libdata-serializer-perl/current/t/04-02-Compress-PPMd.t
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-serializer-perl/current/t/04-02-Compress-PPMd.t?rev=8620&op=file
==============================================================================
--- branches/upstream/libdata-serializer-perl/current/t/04-02-Compress-PPMd.t (added)
+++ branches/upstream/libdata-serializer-perl/current/t/04-02-Compress-PPMd.t Sun Oct 28 17:30:09 2007
@@ -1,0 +1,57 @@
+use lib "./t";             # to pick up a ExtUtils::TBone
+
+
+require "./t/serializer-testlib";
+
+use Data::Serializer; 
+
+use ExtUtils::TBone;
+
+my $T = typical ExtUtils::TBone;                 # standard log
+
+
+	
+my @serializers;
+
+foreach my $serializer (keys %serializers) {
+	if (eval "require $serializer") {
+		$T->msg("Found serializer $serializer");  
+		push(@serializers, $serializer);
+	}
+}
+
+
+$T->msg("No serializers found!!") unless (@serializers);
+
+my @types = qw(compressppmd);
+
+find_features($T, at types);
+
+my $testcount = 0;
+
+foreach my $serializer (@serializers) {
+	while (my ($test,$value) = each %{$serializers{$serializer}}) {
+		next unless $value;
+		foreach my $type (@types) {
+			next unless $found_type{$type}; 
+                        $testcount += $value;
+                }
+        }
+}
+unless ($testcount) {
+        $T->begin("0 # Skipped:  @types not installed");
+        exit;
+}
+$T->begin($testcount);
+$T->msg("Begin Testing for @types");  # message for the log
+
+foreach my $serializer (@serializers) {
+	while (my ($test,$value) = each %{$serializers{$serializer}}) {
+		next unless $value;
+		foreach my $type (@types) {
+			next unless $found_type{$type}; 
+                	run_test($T,$serializer,$test,$type);
+                }
+        }
+}
+

Modified: branches/upstream/libdata-serializer-perl/current/t/09-Feature-Combos.t
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-serializer-perl/current/t/09-Feature-Combos.t?rev=8620&op=diff
==============================================================================
--- branches/upstream/libdata-serializer-perl/current/t/09-Feature-Combos.t (original)
+++ branches/upstream/libdata-serializer-perl/current/t/09-Feature-Combos.t Sun Oct 28 17:30:09 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: branches/upstream/libdata-serializer-perl/current/t/serializer-testlib
URL: http://svn.debian.org/wsvn/branches/upstream/libdata-serializer-perl/current/t/serializer-testlib?rev=8620&op=diff
==============================================================================
--- branches/upstream/libdata-serializer-perl/current/t/serializer-testlib (original)
+++ branches/upstream/libdata-serializer-perl/current/t/serializer-testlib Sun Oct 28 17:30:09 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