From: Karen Etheridge Date: Fri, 1 May 2020 15:29:31 +0000 (-0700) Subject: only use JSON::XS here if new enough, to be consistent with Makefile.PL X-Git-Tag: v1.004001~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=48d383c7c124117ea159a61b62e7ce7dd10ab163;p=p5sagit%2FJSON-MaybeXS.git only use JSON::XS here if new enough, to be consistent with Makefile.PL boolean handling changed enough in 3.0 that older versions are not very compatible. --- diff --git a/lib/JSON/MaybeXS.pm b/lib/JSON/MaybeXS.pm index 46b15a9..a101a36 100644 --- a/lib/JSON/MaybeXS.pm +++ b/lib/JSON/MaybeXS.pm @@ -16,7 +16,7 @@ sub _choose_json_module { return 'Cpanel::JSON::XS' if eval { require Cpanel::JSON::XS; 1; }; push @err, "Error loading Cpanel::JSON::XS: $@"; - return 'JSON::XS' if eval { require JSON::XS; 1; }; + return 'JSON::XS' if eval { require JSON::XS; JSON::XS->VERSION(3.0); 1; }; push @err, "Error loading JSON::XS: $@"; return 'JSON::PP' if eval { require JSON::PP; 1 };