From 5b6dfb4787c9e110ba59221c5d257a6b443c7612 Mon Sep 17 00:00:00 2001
From: Slaven Rezic <cpansand@eserte>
Date: Sun, 24 Apr 2016 10:24:13 +0000
Subject: [PATCH] set allow_nonref (RT #112960)

---
 t/madness_json.t | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/madness_json.t b/t/madness_json.t
index db13def..c99ec59 100644
--- a/t/madness_json.t
+++ b/t/madness_json.t
@@ -230,7 +230,7 @@ format STDOUT =
     else {
         $expected_dot = 'undef';
     }
-    my $jstrue= JSON::XS::decode_json("true");
+    my $jstrue= JSON::XS->new->allow_nonref->decode("true");
     my %hash = (
         UND => undef,
         IV  => 1,
@@ -392,7 +392,7 @@ EXPECT
     }
     # In JSON::XS < 3, the boolean class is JSON::XS::Boolean
     # In JSON::XS >= 3, the boolean class is JSON::PP::Boolean
-    my $json_boolean_class = ref JSON::XS::decode_json("true");
+    my $json_boolean_class = ref JSON::XS->new->allow_nonref->decode("true");
     $expect =~ s{JSON::XS::Boolean}{$json_boolean_class}g;
     same( $dump= $o->Data(\%hash)->Out, template( $expect, expected_dot => $expected_dot ), "", $o);
 }
-- 
2.1.2