<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From 8eea66d9d76ead66ba7bdeb08e8490b0870169b8 Mon Sep 17 00:00:00 2001
From: Magnolia K &lt;magnolia.k@icloud.com&gt;
Date: Sat, 21 Jan 2017 13:33:56 +0900
Subject: [PATCH] Fixed deprecated warning

Incorporate the fixes made in Mojo::JSON below.

https://github.com/kraih/mojo/commit/d76e408bc98bda105466b208e71224d99cb88243
---
 lib/JSON/Tiny.pm | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/lib/JSON/Tiny.pm b/lib/JSON/Tiny.pm
index fcf7470..af0451c 100644
--- a/lib/JSON/Tiny.pm
+++ b/lib/JSON/Tiny.pm
@@ -10,6 +10,7 @@ use Carp 'croak';
 use Exporter 'import';
 use Scalar::Util 'blessed';
 use Encode ();
+use B;
 
 our $VERSION = '0.56';
 our @EXPORT_OK = qw(decode_json encode_json false from_json j to_json true);
@@ -265,16 +266,8 @@ sub _encode_value {
 
   # Number (bitwise operators change behavior based on the internal value type)
 
-  # "0" &amp; $x will modify the flags on the "0" on perl &lt; 5.14, so use a copy
-  my $zero = "0";
-  # "0" &amp; $num -&gt; 0. "0" &amp; "" -&gt; "". "0" &amp; $string -&gt; a character.
-  # this maintains the internal type but speeds up the xor below.
-  my $check = $zero &amp; $value;
   return $value
-    if length $check
-    # 0 ^ itself          -&gt; 0    (false)
-    # $character ^ itself -&gt; "\0" (true)
-    &amp;&amp; !($check ^ $check)
+    if B::svref_2object(\$value)-&gt;FLAGS &amp; (B::SVp_IOK | B::SVp_NOK)
     # filter out "upgraded" strings whose numeric form doesn't strictly match
     &amp;&amp; 0 + $value eq $value
     # filter out inf and nan
-- 
2.1.2

</pre></body></html>