* [PATCH 1/3] smsg: inline _extract_mid functionality
2020-04-01 6:16 5% [PATCH 0/3] Message-ID-related cleanups Eric Wong
@ 2020-04-01 6:16 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-04-01 6:16 UTC (permalink / raw)
To: meta
No need to keep an extra sub which isn't called anywhere else,
and the mid_clean call is redundant since mid_mime already
plucks the msgid out of the angle brackets.
---
lib/PublicInbox/Smsg.pm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/PublicInbox/Smsg.pm b/lib/PublicInbox/Smsg.pm
index 5eb0723f..7c90b92d 100644
--- a/lib/PublicInbox/Smsg.pm
+++ b/lib/PublicInbox/Smsg.pm
@@ -12,7 +12,7 @@ use strict;
use warnings;
use base qw(Exporter);
our @EXPORT_OK = qw(subject_normalized);
-use PublicInbox::MID qw/mid_clean mid_mime/;
+use PublicInbox::MID qw/mid_mime/;
use PublicInbox::Address;
use PublicInbox::MsgTime qw(msg_timestamp msg_datestamp);
use Time::Local qw(timegm);
@@ -178,12 +178,10 @@ sub mid ($;$) {
$rv;
} else {
die "NO {mime} for mid\n" unless $self->{mime};
- $self->_extract_mid; # v1 w/o Xapian
+ mid_mime($self->{mime}) # v1 w/o Xapian
}
}
-sub _extract_mid { mid_clean(mid_mime($_[0]->{mime})) }
-
our $REPLY_RE = qr/^re:\s+/i;
sub subject_normalized ($) {
^ permalink raw reply related [relevance 7%]
* [PATCH 0/3] Message-ID-related cleanups
@ 2020-04-01 6:16 5% Eric Wong
2020-04-01 6:16 7% ` [PATCH 1/3] smsg: inline _extract_mid functionality Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-04-01 6:16 UTC (permalink / raw)
To: meta
While I'm still not sure what to do about spaces in Message-IDs(*),
I noticed some improvements that could be made to make our Message-ID
handling code more consistent.
(*) https://public-inbox.org/meta/20200331083250.GA27164@dcvr/
Eric Wong (3):
smsg: inline _extract_mid functionality
searchidx: v1: skip mid_clean on mid_mime results
mid: add $MID_EXTRACT regexp for export
lib/PublicInbox/Linkify.pm | 3 ++-
lib/PublicInbox/MID.pm | 12 +++++++-----
lib/PublicInbox/NNTP.pm | 16 ++++++++--------
lib/PublicInbox/SearchIdx.pm | 6 +++---
lib/PublicInbox/SearchThread.pm | 3 ++-
lib/PublicInbox/Smsg.pm | 6 ++----
lib/PublicInbox/View.pm | 5 +++--
scripts/ssoma-replay | 2 +-
8 files changed, 28 insertions(+), 25 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-04-01 6:16 5% [PATCH 0/3] Message-ID-related cleanups Eric Wong
2020-04-01 6:16 7% ` [PATCH 1/3] smsg: inline _extract_mid functionality Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).