]> Sergey Matveev's repositories - public-inbox.git/commitdiff
manifest: favor Cpanel::JSON::XS
authorEric Wong <e@80x24.org>
Sat, 3 Oct 2020 23:12:46 +0000 (23:12 +0000)
committerEric Wong <e@80x24.org>
Mon, 5 Oct 2020 01:59:27 +0000 (01:59 +0000)
JSON::MaybeXS already favors Cpanel::JSON::XS (and has for many
years, now).  Allow users to skip installing JSON::MaybeXS if
they want an XS-based JSON implementation.

lib/PublicInbox/ManifestJsGz.pm

index f98d9d010925dcf1a6d6a1ff8fca89f7ad65eec5..16d2a87c49fd5f902d94218ec54427007161eb38 100644 (file)
@@ -16,7 +16,7 @@ use HTTP::Date qw(time2str);
 *try_cat = \&PublicInbox::Inbox::try_cat;
 
 our $json;
-for my $mod (qw(JSON::MaybeXS JSON JSON::PP)) {
+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;