in some versions (2.3403 at least), there existed a Cpanel::JSON::XS::Boolean
Karen Etheridge [Thu, 13 Nov 2014 04:51:19 +0000 (20:51 -0800)]
e.g.
http://www.cpantesters.org/cpan/report/a88cec6c-6c0c-1014-9b28-b6064b81bcf7
http://www.cpantesters.org/cpan/report/0983841a-6bfe-1014-bfbd-545708ca0d94
http://www.cpantesters.org/cpan/report/0b377387-6bf5-1014-a004-0fd3f4f552f6

Changes
lib/JSON/MaybeXS.pm

diff --git a/Changes b/Changes
index 599a051..a31a0bc 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 Revision history for JSON-MaybeXS
 
+ - fix boolean interoperability with older Cpanel::JSON::MaybeXS
+
 1.003_000 - 2014-10-30
  - add :legacy tag to support legacy apps
 
index 354fba3..a375af7 100644 (file)
@@ -55,6 +55,7 @@ sub is_bool {
 
   Scalar::Util::blessed($_[0])
     and ($_[0]->isa('JSON::XS::Boolean')
+      or $_[0]->isa('Cpanel::JSON::PP::Boolean')
       or $_[0]->isa('JSON::PP::Boolean'));
 }