[libsereal-encoder-perl] 01/05: Imported Upstream version 2.11

gregor herrmann gregoa at debian.org
Mon Apr 14 19:16:06 UTC 2014


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libsereal-encoder-perl.

commit 4bf047b5aa46b32071e388847d96a1f08f6a18e0
Author: gregor herrmann <gregoa at debian.org>
Date:   Mon Apr 14 21:03:36 2014 +0200

    Imported Upstream version 2.11
---
 Changes                  | 12 ++++++++++++
 META.json                |  4 ++--
 META.yml                 |  4 ++--
 const-c.inc              |  2 +-
 lib/Sereal/Encoder.pm    |  2 +-
 t/lib/Sereal/BulkTest.pm | 26 +++++++++++++++++---------
 6 files changed, 35 insertions(+), 15 deletions(-)

diff --git a/Changes b/Changes
index aaaebfd..a12f34b 100644
--- a/Changes
+++ b/Changes
@@ -4,6 +4,18 @@ Revision history for Perl extension Sereal-Encoder
 *          of the decoder before upgrading to version 2 of the
 *          encoder!
 
+2.11 Sun Apr 13 23:04
+  - Work around regression in Perl 5.16.3 - 5.17.0
+    As of 8ae39f603f0f5778c160e18e08df60 while each
+    automagically becomes while $_= defined(each);
+    which manages to break some of our test code.
+
+2.10 Sun Apr 13 21:30
+  - Fix broken MANIFEST
+
+2.09 Sun Apr 13 21:15
+  - Synchro release with Decoder change.
+
 2.08 Thu Apr 10 22:10 2013
   - Production release for previous changes.
 
diff --git a/META.json b/META.json
index 6007bd5..60d1bba 100644
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
       "Steffen Mueller <smueller at cpan.org>, Yves Orton <yves at cpan.org>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 6.9, CPAN::Meta::Converter version 2.120351",
+   "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921",
    "license" : [
       "perl_5"
    ],
@@ -55,5 +55,5 @@
          "url" : "git://github.com/Sereal/Sereal.git"
       }
    },
-   "version" : "2.08"
+   "version" : "2.11"
 }
diff --git a/META.yml b/META.yml
index d949264..c437730 100644
--- a/META.yml
+++ b/META.yml
@@ -16,7 +16,7 @@ build_requires:
 configure_requires:
   ExtUtils::MakeMaker: 0
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.9, CPAN::Meta::Converter version 2.120351'
+generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -32,4 +32,4 @@ requires:
 resources:
   bugtracker: https://github.com/Sereal/Sereal/issues
   repository: git://github.com/Sereal/Sereal.git
-version: 2.08
+version: 2.11
diff --git a/const-c.inc b/const-c.inc
index df00f43..7965ac4 100644
--- a/const-c.inc
+++ b/const-c.inc
@@ -673,7 +673,7 @@ constant (pTHX_ const char *name, STRLEN len, IV *iv_return) {
      Regenerate these constant functions by feeding this entire source file to
      perl -x
 
-#!/usr/bin/perl -w
+#!/home/yorton/perl5/perlbrew/perls/perl-5.18.2/bin/perl -w
 use ExtUtils::Constant qw (constant_types C_constant XS_constant);
 
 my $types = {map {($_, 1)} qw(IV)};
diff --git a/lib/Sereal/Encoder.pm b/lib/Sereal/Encoder.pm
index ad27e3a..26157c6 100644
--- a/lib/Sereal/Encoder.pm
+++ b/lib/Sereal/Encoder.pm
@@ -5,7 +5,7 @@ use warnings;
 use Carp qw/croak/;
 use XSLoader;
 
-our $VERSION = '2.08'; # Don't forget to update the TestCompat set for testing against installed decoders!
+our $VERSION = '2.11'; # Don't forget to update the TestCompat set for testing against installed decoders!
 our $XS_VERSION = $VERSION; $VERSION= eval $VERSION;
 
 # not for public consumption, just for testing.
diff --git a/t/lib/Sereal/BulkTest.pm b/t/lib/Sereal/BulkTest.pm
index 4109906..a74a549 100644
--- a/t/lib/Sereal/BulkTest.pm
+++ b/t/lib/Sereal/BulkTest.pm
@@ -66,12 +66,12 @@ sub read_files {
     }
 
     my $count= 0;
-    foreach (@$corpus) {
-        $count++ if $sub->($_);
+    foreach my $test (@$corpus) {
+        $count++ if $sub->($test);
     }
     return $count;
 }
-
+#use Devel::Peek;
 sub run_bulk_tests {
     my %opt = @_;
 
@@ -79,8 +79,9 @@ sub run_bulk_tests {
         my $total= read_files(sub { return 1 });
         my $read= 0;
         my $eval_ok= read_files(sub {
+            my $struct= $_[0];
             diag("read $read\n") unless ++$read % 1000;
-            my ($dump,$undump);
+            my ($dump, $undump);
             my $ok= eval {
                 $dump = Sereal::Encoder::encode_sereal($_[0]);
                 $undump= Sereal::Decoder::decode_sereal($dump);
@@ -89,11 +90,19 @@ sub run_bulk_tests {
             my $err = $@ || 'Zombie error';
             ok($ok,"Error return is empty")
                 or diag("Error was: '$err'"), return $ok;
+            if ($ok and ref($struct) eq "HASH") {
+                my $each_count= 0;
+
+                $each_count++ while my($k,$v)= each %$undump;
 
-            my $eval_dump= Data::Dumper->new([ $_[0] ])->Sortkeys(1)->Dump();
-            my $undump_dump= Data::Dumper->new([ $undump ])->Sortkeys(1)->Dump();
-            $ok= is_string($undump_dump, $eval_dump)
-                or diag $_[0];
+                my $keys_count= 0 + keys %$struct;
+                is($each_count,$keys_count,"Number of keys match");
+            }
+
+            my $struct_dd= Data::Dumper->new([ $struct ])->Sortkeys(1)->Dump();
+            my $undump_dd= Data::Dumper->new([ $undump ])->Sortkeys(1)->Dump();
+            $ok= is_string($undump_dd, $struct_dd)
+                or diag $struct_dd;
             return $ok;
         });
         is($total,$eval_ok);
@@ -130,5 +139,4 @@ sub run_bulk_tests {
         note join "\n","", map {sprintf"%-20s" . (" %20s" x (@$_-1)), @$_ } @$result;
     }
 }
-
 1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libsereal-encoder-perl.git



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