From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 7520F2018E; Thu, 18 Aug 2016 01:39:41 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Cc: Thomas Ferris Nicolaisen , Johannes Schindelin Subject: [PATCH 1/3] view: attach_link uses string concatentation Date: Thu, 18 Aug 2016 01:39:39 +0000 Message-Id: <20160818013941.8673-2-e@80x24.org> In-Reply-To: <20160818013941.8673-1-e@80x24.org> References: <20160818013941.8673-1-e@80x24.org> List-Id: There is no point in using an array to join on an empty string (my original intention was probably to join on "\n"). This is only preparation for the next change to show a warning to in the attachment link. --- lib/PublicInbox/View.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 6f79f60..3057221 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -427,10 +427,10 @@ sub attach_link ($$$$) { } else { $sfn = 'a.bin'; } - my @ret = qq($nl[-- Attachment #$idx: ); + my $ret = qq($nl[-- Attachment #$idx: ); my $ts = "Type: $ct, Size: $size bytes"; - push(@ret, ($desc eq '') ? "$ts --]" : "$desc --]\n[-- $ts --]"); - join('', @ret, "\n"); + $ret .= ($desc eq '') ? "$ts --]" : "$desc --]\n[-- $ts --]"; + $ret .= "\n"; } sub add_text_body { -- EW