From: Karen Etheridge Date: Thu, 13 Nov 2014 04:51:19 +0000 (-0800) Subject: in some versions (2.3403 at least), there existed a Cpanel::JSON::XS::Boolean X-Git-Tag: v1.003001~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e36f5217001798aec1e894c8c6e8bd1504d9c6b7;p=p5sagit%2FJSON-MaybeXS.git in some versions (2.3403 at least), there existed a Cpanel::JSON::XS::Boolean 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 --- diff --git a/Changes b/Changes index 599a051..a31a0bc 100644 --- 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 diff --git a/lib/JSON/MaybeXS.pm b/lib/JSON/MaybeXS.pm index 354fba3..a375af7 100644 --- a/lib/JSON/MaybeXS.pm +++ b/lib/JSON/MaybeXS.pm @@ -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')); }