[libjson-pp-perl] 01/05: Imported Upstream version 2.97000

dom at earth.li dom at earth.li
Sun Nov 26 19:19:42 UTC 2017


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

dom pushed a commit to branch master
in repository libjson-pp-perl.

commit 5db7edad1d0796a2ef0f6f12e896e27347725c2e
Author: Dominic Hargreaves <dom at earth.li>
Date:   Sun Nov 26 18:36:57 2017 +0000

    Imported Upstream version 2.97000
---
 Changes                | 13 +++++++++++++
 META.json              |  2 +-
 META.yml               |  2 +-
 bin/json_pp            |  2 +-
 lib/JSON/PP.pm         |  6 +++---
 lib/JSON/PP/Boolean.pm |  2 +-
 t/003_types.t          |  4 +++-
 t/110_bignum.t         |  4 ++--
 8 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/Changes b/Changes
index cc73e48..e3d9904 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,18 @@
 Revision history for Perl extension JSON::PP.
 
+2.97000 2017-11-21
+    - fix is_bool to use blessed() instead of ref() (jwrightecs++)
+    - use 5 digit minor version number for a while to avoid confusion
+      (GH#33, dansut)
+
+2.96  2017-11-20
+    - not to use newer Test::More features (RT-122421 for JSON)
+
+2.95  2017-11-20
+    - json_pp now prints an encoded json string (RT#123653)
+    - fix is_bool to use ->isa("JSON::PP::Boolean"), instead
+      of UNIVERSAL::isa("JSON::PP::Boolean") (GH#34, aidy++)
+
 2.94  2017-05-29
     - fix a test to support perl 5.6
 
diff --git a/META.json b/META.json
index 0d404a6..b8cc2f0 100644
--- a/META.json
+++ b/META.json
@@ -43,5 +43,5 @@
          "url" : "http://github.com/makamaka/JSON-PP"
       }
    },
-   "version" : "2.94"
+   "version" : "2.97000"
 }
diff --git a/META.yml b/META.yml
index fef74e2..d211ced 100644
--- a/META.yml
+++ b/META.yml
@@ -22,4 +22,4 @@ requires:
   Test::More: '0'
 resources:
   repository: http://github.com/makamaka/JSON-PP
-version: '2.94'
+version: '2.97000'
diff --git a/bin/json_pp b/bin/json_pp
index 1bde07c..a0d245c 100644
--- a/bin/json_pp
+++ b/bin/json_pp
@@ -50,7 +50,7 @@ my %F = (
 my %T = (
    'null' => sub { "" },
    'json' => sub {
-      my $json = JSON::PP->new;
+      my $json = JSON::PP->new->utf8;
       $json->$_() for @json_opt;
       $json->encode( $_ );
    },
diff --git a/lib/JSON/PP.pm b/lib/JSON/PP.pm
index fb07cee..f608c29 100644
--- a/lib/JSON/PP.pm
+++ b/lib/JSON/PP.pm
@@ -14,7 +14,7 @@ use JSON::PP::Boolean;
 use Carp ();
 #use Devel::Peek;
 
-$JSON::PP::VERSION = '2.94';
+$JSON::PP::VERSION = '2.97000';
 
 @JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json);
 
@@ -1405,7 +1405,7 @@ BEGIN {
 $JSON::PP::true  = do { bless \(my $dummy = 1), "JSON::PP::Boolean" };
 $JSON::PP::false = do { bless \(my $dummy = 0), "JSON::PP::Boolean" };
 
-sub is_bool { defined $_[0] and UNIVERSAL::isa($_[0], "JSON::PP::Boolean"); }
+sub is_bool { blessed $_[0] and $_[0]->isa("JSON::PP::Boolean"); }
 
 sub true  { $JSON::PP::true  }
 sub false { $JSON::PP::false }
@@ -1654,7 +1654,7 @@ JSON::PP - JSON::XS compatible pure-Perl module.
 
 =head1 VERSION
 
-    2.91_04
+    2.97000
 
 =head1 DESCRIPTION
 
diff --git a/lib/JSON/PP/Boolean.pm b/lib/JSON/PP/Boolean.pm
index ad9284f..bb577bf 100644
--- a/lib/JSON/PP/Boolean.pm
+++ b/lib/JSON/PP/Boolean.pm
@@ -8,7 +8,7 @@ use overload (
     fallback => 1,
 );
 
-$JSON::PP::Boolean::VERSION = '2.94';
+$JSON::PP::Boolean::VERSION = '2.97000';
 
 1;
 
diff --git a/t/003_types.t b/t/003_types.t
index 8a20ee3..22e0f7e 100644
--- a/t/003_types.t
+++ b/t/003_types.t
@@ -2,7 +2,7 @@
 use strict;
 use Test::More;
 
-BEGIN { plan tests => 76 };
+BEGIN { plan tests => 78 };
 
 BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
 
@@ -21,6 +21,8 @@ ok ($false == !$true);
 ok (JSON::PP::is_bool $false);
 ok (++$false == 1);
 ok (!JSON::PP::is_bool $false);
+ok (!JSON::PP::is_bool "JSON::PP::Boolean");
+ok (!JSON::PP::is_bool {}); # GH-34
 
 ok (JSON::PP->new->allow_nonref (1)->decode ('5') == 5);
 ok (JSON::PP->new->allow_nonref (1)->decode ('-5') == -5);
diff --git a/t/110_bignum.t b/t/110_bignum.t
index e97c89e..c4c282f 100644
--- a/t/110_bignum.t
+++ b/t/110_bignum.t
@@ -27,7 +27,7 @@ $json->convert_blessed->allow_blessed;
 
 my $num  = $json->decode(q|100000000000000000000000000000000000000|);
 
-isa_ok($num, 'Math::BigInt');
+ok($num->isa('Math::BigInt'));
 is("$num", $fix . '100000000000000000000000000000000000000');
 is($json->encode($num), $fix . '100000000000000000000000000000000000000');
 
@@ -40,7 +40,7 @@ ok(!(ref $num and $num->isa('Math::BigFloat')), 'small integer is not a BigFloat
 
 $num  = $json->decode(q|2.0000000000000000001|);
 
-isa_ok($num, 'Math::BigFloat');
+ok($num->isa('Math::BigFloat'));
 is("$num", '2.0000000000000000001');
 is($json->encode($num), '2.0000000000000000001');
 

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



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