]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/ManifestJsGz.pm
move JSON module portability into PublicInbox::Config
[public-inbox.git] / lib / PublicInbox / ManifestJsGz.pm
index 16d2a87c49fd5f902d94218ec54427007161eb38..ab1478afcc38507245a8b41b9ac0ddfcb747d5c9 100644 (file)
@@ -10,17 +10,13 @@ use Digest::SHA ();
 use File::Spec ();
 use bytes (); # length
 use PublicInbox::Inbox;
+use PublicInbox::Config;
 use PublicInbox::Git;
 use IO::Compress::Gzip qw(gzip);
 use HTTP::Date qw(time2str);
 *try_cat = \&PublicInbox::Inbox::try_cat;
 
-our $json;
-for my $mod (qw(Cpanel::JSON::XS JSON::MaybeXS JSON JSON::PP)) {
-       eval "require $mod" or next;
-       # ->ascii encodes non-ASCII to "\uXXXX"
-       $json = $mod->new->ascii(1) and last;
-}
+our $json = PublicInbox::Config::json();
 
 # called by WwwListing
 sub url_regexp {