From: Karen Etheridge Date: Tue, 28 Jun 2016 21:49:59 +0000 (-0700) Subject: simplify JSON::XS prereq X-Git-Tag: v1.003006_001~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d9683633b9cd489bbab578effbda7117d5334c3e;p=p5sagit%2FJSON-MaybeXS.git simplify JSON::XS prereq We now always upgrade it if it is already present, which also wards off incompatibilities if something else later installs Cpanel::JSON::XS. --- diff --git a/Changes b/Changes index 27bedee..23c0fd6 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,8 @@ Revision history for JSON-MaybeXS - bump prereq on JSON::PP, to ensure we get the fix for parsing utf8-encoded values + - we now always upgrade JSON::XS if it is installed and below version 3.0, + due to changes in handling booleans 1.003005 - 2015-03-22 - fix x_contributors metadata that was killing metacpan (see diff --git a/Makefile.PL b/Makefile.PL index 8dbcd06..c355ff8 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -88,17 +88,10 @@ if (not $args->{PUREPERL_ONLY}) { if (eval { require Cpanel::JSON::XS; 1 } and not eval { Cpanel::JSON::XS->VERSION('2.3310'); 1 }) or (not eval { require JSON::XS; 1; } and can_xs()); - # avoid "JSON::XS::Boolean::* redefined" warnings caused by incompatibilities - # between JSON::XS 2.x and 3.0 -- + # JSON::XS 3 changed its boolean handling - update it # if JSON::XS is installed and < 3.0 - # and Cpanel::JSON::XS is (or is about to be) >= 3.0, - # then update JSON::XS to eliminate the incompatibility $WriteMakefileArgs{PREREQ_PM}{'JSON::XS'} = '3.00' - if eval { require JSON::XS; 1 } and not eval { JSON::XS->VERSION('3.0'); 1 } - and (eval { require Cpanel::JSON::XS; Cpanel::JSON::XS->VERSION('3.0'); 1 } - # we presume here that if we are installing Cpanel::JSON::XS, we - # are installing the latest version - or exists $WriteMakefileArgs{PREREQ_PM}{'Cpanel::JSON::XS'}); + if eval { require JSON::XS; 1 } and not eval { JSON::XS->VERSION('3.0'); 1 }; } $WriteMakefileArgs{MIN_PERL_VERSION} = delete $WriteMakefileArgs{PREREQ_PM}{perl} || 0;