summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2021-02-19 13:57:42 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2021-02-19 14:15:19 +0000
commit9f96ea80ded61473ce903ba8dd250cafade9ac84 (patch)
tree74fdde860ffcc3420650c287860bc62ae4609e4d
parente747905416638c61e2024f0d918b0e3e5db98d5e (diff)
downloadperl-9f96ea80ded61473ce903ba8dd250cafade9ac84.tar.gz
Update JSON-PP to CPAN version 4.06
[DELTA] 4.06 2021-01-24 - fix return values of boolean_values for compatibility (yahermann++)
-rw-r--r--META.json2
-rwxr-xr-xPorting/Maintainers.pl2
-rw-r--r--cpan/JSON-PP/lib/JSON/PP.pm5
-rw-r--r--cpan/JSON-PP/lib/JSON/PP/Boolean.pm2
-rw-r--r--cpan/JSON-PP/t/118_boolean_values.t8
5 files changed, 10 insertions, 9 deletions
diff --git a/META.json b/META.json
index 38066d80ac..72ccd5c048 100644
--- a/META.json
+++ b/META.json
@@ -132,5 +132,5 @@
}
},
"version" : "5.033007",
- "x_serialization_backend" : "JSON::PP version 4.05"
+ "x_serialization_backend" : "JSON::PP version 4.06"
}
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index f6dc82a14a..6582e6cb9f 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -674,7 +674,7 @@ use File::Glob qw(:case);
},
'JSON::PP' => {
- 'DISTRIBUTION' => 'ISHIGAKI/JSON-PP-4.05.tar.gz',
+ 'DISTRIBUTION' => 'ISHIGAKI/JSON-PP-4.06.tar.gz',
'FILES' => q[cpan/JSON-PP],
},
diff --git a/cpan/JSON-PP/lib/JSON/PP.pm b/cpan/JSON-PP/lib/JSON/PP.pm
index 0507921463..2475fe1e87 100644
--- a/cpan/JSON-PP/lib/JSON/PP.pm
+++ b/cpan/JSON-PP/lib/JSON/PP.pm
@@ -14,7 +14,7 @@ use JSON::PP::Boolean;
use Carp ();
#use Devel::Peek;
-$JSON::PP::VERSION = '4.05';
+$JSON::PP::VERSION = '4.06';
@JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json);
@@ -201,12 +201,11 @@ sub boolean_values {
my ($false, $true) = @_;
$self->{false} = $false;
$self->{true} = $true;
- return ($false, $true);
} else {
delete $self->{false};
delete $self->{true};
- return;
}
+ return $self;
}
sub get_boolean_values {
diff --git a/cpan/JSON-PP/lib/JSON/PP/Boolean.pm b/cpan/JSON-PP/lib/JSON/PP/Boolean.pm
index 5d5b17c236..a6b9ee1137 100644
--- a/cpan/JSON-PP/lib/JSON/PP/Boolean.pm
+++ b/cpan/JSON-PP/lib/JSON/PP/Boolean.pm
@@ -10,7 +10,7 @@ overload::import('overload',
fallback => 1,
);
-$JSON::PP::Boolean::VERSION = '4.05';
+$JSON::PP::Boolean::VERSION = '4.06';
1;
diff --git a/cpan/JSON-PP/t/118_boolean_values.t b/cpan/JSON-PP/t/118_boolean_values.t
index 5a2c2b32b7..f575b72290 100644
--- a/cpan/JSON-PP/t/118_boolean_values.t
+++ b/cpan/JSON-PP/t/118_boolean_values.t
@@ -37,13 +37,14 @@ if (eval "require Types::Serialiser; 1") {
push @tests, [Types::Serialiser::true(), Types::Serialiser::false(), 'Types::Serialiser::BooleanBase', 'Types::Serialiser::BooleanBase'];
}
-plan tests => 13 * @tests;
+plan tests => 15 * @tests;
my $json = JSON::PP->new;
for my $test (@tests) {
my ($true, $false, $true_class, $false_class, $incompat) = @$test;
- $json->boolean_values($false, $true);
+ my $ret = $json->boolean_values($false, $true);
+ is $ret => $json, "returns the same object";
my ($new_false, $new_true) = $json->get_boolean_values;
ok defined $new_true, "new true class is defined";
ok defined $new_false, "new false class is defined";
@@ -70,7 +71,8 @@ for my $test (@tests) {
is $should_false_json => 'false', "A $false_class object turns into JSON false";
}
- $json->boolean_values();
+ $ret = $json->boolean_values();
+ is $ret => $json, "returns the same object";
ok !$json->get_boolean_values, "reset boolean values";
$should_true = $json->allow_nonref(1)->decode('true');