projects
/
p5sagit/JSON-MaybeXS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
9e8934e
)
also refuse to use old JSON::XS if it is already loaded
Graham Knop [Fri, 1 May 2020 16:12:59 +0000 (18:12 +0200)]
lib/JSON/MaybeXS.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/JSON/MaybeXS.pm
b/lib/JSON/MaybeXS.pm
index
376853a
..
f93686d
100644
(file)
--- 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;