From: Graham Knop Date: Fri, 1 May 2020 16:12:59 +0000 (+0200) Subject: also refuse to use old JSON::XS if it is already loaded X-Git-Tag: v1.004001~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=34e2d2471e101a082757212f55ee9781f47308d7;p=p5sagit%2FJSON-MaybeXS.git also refuse to use old JSON::XS if it is already loaded --- diff --git a/lib/JSON/MaybeXS.pm b/lib/JSON/MaybeXS.pm index 376853a..f93686d 100644 --- a/lib/JSON/MaybeXS.pm +++ b/lib/JSON/MaybeXS.pm @@ -9,7 +9,7 @@ $VERSION =~ tr/_//d; sub _choose_json_module { return 'Cpanel::JSON::XS' if $INC{'Cpanel/JSON/XS.pm'}; - return 'JSON::XS' if $INC{'JSON/XS.pm'}; + return 'JSON::XS' if $INC{'JSON/XS.pm'} && eval { JSON::XS->VERSION(3.0); 1 }; my @err;