c580bb8
From 073c636002cb9c19bba16389e882f1bf4ab23fb2 Mon Sep 17 00:00:00 2001
c580bb8
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
c580bb8
Date: Tue, 4 Dec 2018 12:52:28 +0100
c580bb8
Subject: [PATCH] Support JSON::XS 4
c580bb8
MIME-Version: 1.0
c580bb8
Content-Type: text/plain; charset=UTF-8
c580bb8
Content-Transfer-Encoding: 8bit
c580bb8
c580bb8
JSON::XS 4 has the same API as version 3. It only enables allow_nonref
c580bb8
by default.
c580bb8
c580bb8
CPAN RT#127753
c580bb8
c580bb8
Signed-off-by: Petr Písař <ppisar@redhat.com>
c580bb8
---
c580bb8
 lib/JSON/Any.pm | 4 ++++
c580bb8
 1 file changed, 4 insertions(+)
c580bb8
c580bb8
diff --git a/lib/JSON/Any.pm b/lib/JSON/Any.pm
c580bb8
index a8a607e..11a4928 100644
c580bb8
--- a/lib/JSON/Any.pm
c580bb8
+++ b/lib/JSON/Any.pm
c580bb8
@@ -220,6 +220,10 @@ BEGIN {
c580bb8
     $conf{json_xs_3} = { %{ $conf{json_xs_2} } };
c580bb8
     $conf{json_xs_3}{get_true}  = sub { return Types::Serialiser::true(); };
c580bb8
     $conf{json_xs_3}{get_false} = sub { return Types::Serialiser::false(); };
c580bb8
+
c580bb8
+    # JSON::XS 4 is almost the same as JSON::XS 3. It only enables
c580bb8
+    # allow_nonref by default.
c580bb8
+    $conf{json_xs_4} = { %{ $conf{json_xs_3} } };
c580bb8
 }
c580bb8
 
c580bb8
 sub _make_key {
c580bb8
-- 
c580bb8
2.17.2
c580bb8