diff options
author | Karen Etheridge <ether@cpan.org> | 2016-11-10 15:44:38 -0800 |
---|---|---|
committer | Karen Etheridge <ether@cpan.org> | 2016-11-10 17:00:21 -0800 |
commit | c66014146e154391c5367a6e74838f59045020cb (patch) | |
tree | a7a50e724f4635de0e2ec5dd6775d8e6701b48d6 | |
parent | f13faa875d61f8128155afef8086bebeeec9b03d (diff) | |
download | carton-c66014146e154391c5367a6e74838f59045020cb.tar.gz |
switch from JSON to JSON::PP
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | META.json | 2 | ||||
-rw-r--r-- | Makefile.PL | 4 | ||||
-rw-r--r-- | cpanfile | 2 | ||||
-rw-r--r-- | lib/Carton/Util.pm | 8 | ||||
-rw-r--r-- | xt/cli/json_pp.t | 2 |
6 files changed, 10 insertions, 9 deletions
@@ -1,6 +1,7 @@ Revision history for carton {{$NEXT}} + - switched from JSON to JSON::PP v1.0.28 2016-05-23 22:30:48 PDT - Emit the line when parser error happened @@ -50,7 +50,7 @@ "CPAN::Meta::Requirements" : "2.121", "Class::Tiny" : "1.001", "Getopt::Long" : "2.39", - "JSON" : "2.53", + "JSON::PP" : "2.27300", "Module::CPANfile" : "0.9031", "Module::CoreList" : "0", "Module::Metadata" : "1.000003", diff --git a/Makefile.PL b/Makefile.PL index 560603f..945d98b 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -26,7 +26,7 @@ my %WriteMakefileArgs = ( "CPAN::Meta::Requirements" => "2.121", "Class::Tiny" => "1.001", "Getopt::Long" => "2.39", - "JSON" => "2.53", + "JSON::PP" => "2.27300", "Module::CPANfile" => "0.9031", "Module::CoreList" => 0, "Module::Metadata" => "1.000003", @@ -48,7 +48,7 @@ my %FallbackPrereqs = ( "CPAN::Meta::Requirements" => "2.121", "Class::Tiny" => "1.001", "Getopt::Long" => "2.39", - "JSON" => "2.53", + "JSON::PP" => "2.27300", "Module::CPANfile" => "0.9031", "Module::CoreList" => 0, "Module::Metadata" => "1.000003", @@ -4,7 +4,7 @@ on configure => sub { requires 'perl', '5.8.5'; -requires 'JSON', 2.53; +requires 'JSON::PP', '2.27300'; requires 'Module::Metadata', 1.000003; requires 'Module::CPANfile', 0.9031; diff --git a/lib/Carton/Util.pm b/lib/Carton/Util.pm index fb5b8cd..c196249 100644 --- a/lib/Carton/Util.pm +++ b/lib/Carton/Util.pm @@ -18,14 +18,14 @@ sub dump_json { } sub from_json { - require JSON; - JSON::decode_json($_[0]); + require JSON::PP; + JSON::PP->new->utf8->decode($_[0]) } sub to_json { my($data) = @_; - require JSON; - JSON->new->utf8->pretty->canonical->encode($data); + require JSON::PP; + JSON::PP->new->utf8->pretty->canonical->encode($data); } 1; diff --git a/xt/cli/json_pp.t b/xt/cli/json_pp.t index 0c64395..5a5859e 100644 --- a/xt/cli/json_pp.t +++ b/xt/cli/json_pp.t @@ -8,7 +8,7 @@ plan skip_all => "perl <= 5.14" if $] >= 5.015; my $app = cli(); $app->write_cpanfile(<<EOF); -requires 'JSON'; +requires 'JSON::PP'; requires 'CPAN::Meta', '2.12'; EOF |