diff options
author | Eric Wong <e@80x24.org> | 2017-01-07 01:44:51 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-01-07 01:45:45 +0000 |
commit | 492910d43c179a7e1919b2d0f417aea9473f9730 (patch) | |
tree | 659ecf60edb181bd146a28e80612270ff5cefe18 /lib/PublicInbox/SearchMsg.pm | |
parent | f63ea68e457f9e2618eac1d3d62227d2b605651b (diff) | |
download | public-inbox-492910d43c179a7e1919b2d0f417aea9473f9730.tar.gz |
This is faster, smaller, and more straighforward to me with fewer layers of indirection.
Diffstat (limited to 'lib/PublicInbox/SearchMsg.pm')
-rw-r--r-- | lib/PublicInbox/SearchMsg.pm | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm index 4522eb62..5bb00778 100644 --- a/lib/PublicInbox/SearchMsg.pm +++ b/lib/PublicInbox/SearchMsg.pm @@ -103,7 +103,7 @@ sub from_name { sub ts { my ($self) = @_; - $self->{ts} ||= eval { str2time($self->mime->header('Date')) } || 0; + $self->{ts} ||= eval { str2time($self->{mime}->header('Date')) } || 0; } sub to_doc_data { @@ -146,36 +146,7 @@ sub mid ($;$) { } } -sub _extract_mid { mid_clean(mid_mime($_[0]->mime)) } - -sub blob { - my ($self, $x40) = @_; - if (defined $x40) { - $self->{blob} = $x40; - } else { - $self->{blob}; - } -} - -sub mime { - my ($self, $mime) = @_; - if (defined $mime) { - $self->{mime} = $mime; - } else { - # TODO load from git - $self->{mime}; - } -} - -sub doc_id { - my ($self, $doc_id) = @_; - if (defined $doc_id) { - $self->{doc_id} = $doc_id; - } else { - # TODO load from xapian - $self->{doc_id}; - } -} +sub _extract_mid { mid_clean(mid_mime($_[0]->{mime})) } sub thread_id { my ($self) = @_; |