X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FWwwText.pm;h=db5060eaa460bf002c4377b93eb1b14c1cd5c7ba;hb=5c8909925072804901e9c3b45bbf25446d379e7b;hp=a85609168d23a318fe373c4712a153901408c18c;hpb=0d38f65c490466837ae091afa7a7b6f59d04ce7c;p=public-inbox.git
diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm
index a8560916..db5060ea 100644
--- a/lib/PublicInbox/WwwText.pm
+++ b/lib/PublicInbox/WwwText.pm
@@ -1,11 +1,10 @@
-# Copyright (C) 2016-2020 all contributors
+# Copyright (C) 2016-2021 all contributors
# License: AGPL-3.0+
# used for displaying help texts and other non-mail content
package PublicInbox::WwwText;
use strict;
-use warnings;
-use bytes (); # only for bytes::length
+use v5.10.1;
use PublicInbox::Linkify;
use PublicInbox::WwwStream;
use PublicInbox::Hval qw(ascii_html);
@@ -43,7 +42,7 @@ sub get_text {
$txt = $gzf->translate($txt);
$txt .= $gzf->zflush;
}
- $hdr->[3] = bytes::length($txt);
+ $hdr->[3] = length($txt);
return [ $code, $hdr, [ $txt ] ]
}
@@ -165,7 +164,7 @@ EOS
; gzip(1), and sqlite3(1) as documented:
EOF
for (sort keys %$altid_map) {
- $$txt .= "\t;\tcurl -XPOST $base_url$_.sql.gz | \\\n" .
+ $$txt .= "\t;\tcurl -d '' $base_url$_.sql.gz | \\\n" .
"\t;\tgzip -dc | \\\n" .
"\t;\tsqlite3 $inboxdir/$_.sqlite3\n";
$$txt .= "\taltid = serial:$_:file=$_.sqlite3\n";
@@ -191,7 +190,7 @@ EOF
EOF
my $pi_cfg = $ctx->{www}->{pi_cfg};
for my $cr_name (@$cr) {
- my $urls = $pi_cfg->{"coderepo.$cr_name.cgiturl"};
+ my $urls = $pi_cfg->get_all("coderepo.$cr_name.cgiturl");
my $path = "/path/to/$cr_name";
$cr_name = dq_escape($cr_name);