From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id E8D9B1F46C for ; Thu, 23 Jan 2020 23:05:59 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/6] shorten and simplify uniq logic Date: Thu, 23 Jan 2020 23:05:53 +0000 Message-Id: <20200123230559.16781-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: I noticed List::Util 1.45+ includes a new "uniq()" sub, but that's only distributed with Perl as of 5.26+. Since we care about supporting older versions of Perl, I still took the opportunity to simplify some of our own similar logic for making things unique. It turns out only Inbox->nntp_url really benefits from List::Util::uniq at the moment, but there's some small simplifications to be had along the way. Eric Wong (6): contentid: use map to generate %seen for Message-Ids nntp: simplify setting X-Alt-Message-ID inbox: simplify filtering for duplicate NNTP URLs mid: shorten uniq_mids logic wwwstream: shorten cloneurl uniquification contentid: ignore duplicate References: headers lib/PublicInbox/ContentId.pm | 12 ++++-------- lib/PublicInbox/Inbox.pm | 11 +++++------ lib/PublicInbox/MID.pm | 4 +--- lib/PublicInbox/NNTP.pm | 5 +---- lib/PublicInbox/OverIdx.pm | 3 +-- lib/PublicInbox/WwwStream.pm | 8 +++----- 6 files changed, 15 insertions(+), 28 deletions(-)