From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.8 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, RP_MATCHES_RCVD,URIBL_BLOCKED shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 6DAD22018D for ; Thu, 17 Mar 2016 23:06:19 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] www: more consistent URL generation line Date: Thu, 17 Mar 2016 23:06:19 +0000 Message-Id: <20160317230619.13605-1-e@80x24.org> List-Id: It's probably good to have URLs on their own line anyways for ease-of-reading. --- lib/PublicInbox/WWW.pm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 369be68..9a55e49 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -275,15 +275,10 @@ sub footer { my $http = $cgi->base->as_string . $listname; $seen{$http} or unshift @urls, $http; my $ssoma_url = PublicInbox::Hval::prurl($cgi->{env}, SSOMA_URL); - if (scalar(@urls) == 1) { - $urls = "URL for ssoma or git clone --mirror \$URL :) . - $urls[0]; - } else { - $urls = "URLs for ssoma or git clone --mirror \$URL\n) . - join("\n", map { "\t$_" } @urls); - } + my $s = scalar(@urls) > 1 ? 's' : ''; + $urls = "URL$s for ssoma or git clone --mirror \$URL\n) . + join("\n", map { "\t$_" } @urls); my $addr = $ctx->{pi_config}->get($listname, 'address'); if (ref($addr) eq 'ARRAY') { -- EW