Imported Upstream version 2.11
authorgregor herrmann <gregoa@debian.org>
Mon, 14 Apr 2014 19:03:36 +0000 (21:03 +0200)
committergregor herrmann <gregoa@debian.org>
Mon, 14 Apr 2014 19:03:36 +0000 (21:03 +0200)
Changes
META.json
META.yml
const-c.inc
lib/Sereal/Encoder.pm
t/lib/Sereal/BulkTest.pm

diff --git a/Changes b/Changes
index aaaebfd59c2e207411443b00e1f7c5b20fd46f97..a12f34bdc0eff77d0b60dbf302d68bd35c9ab59d 100644 (file)
--- 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.
 
index 6007bd516eba06d165f273d2fb31b4dd7c5134fd..60d1bbac3c5f0fc7fcc7f9b2de1ac82665500d6d 100644 (file)
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
       "Steffen Mueller <smueller@cpan.org>, Yves Orton <yves@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"
 }
index d949264c6d3e8568668442d15e9c48f51dca5477..c437730b79d49ac00bb757531ec2c3b0363982bb 100644 (file)
--- 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
index df00f4324dceaf9303133e2f61a3280dd4de96da..7965ac4e01fb3faffebf20ec62fc8e2b16f0d5f9 100644 (file)
@@ -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)};
index ad27e3a87ddecdeb3f30fcc02e23e9123da9f681..26157c6361c9514107a8a90fbcb79317dcd15375 100644 (file)
@@ -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.
index 41099065f3aa6bedbc24592f7fc751a11dc336fc..a74a549a7f4b8be621d2f23a9a1fecc893cb0aad 100644 (file)
@@ -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;