about summary refs log tree commit homepage
path: root/lib/PublicInbox/WatchMaildir.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-08-01 08:12:27 +0000
committerEric Wong <e@yhbt.net>2020-08-02 08:26:20 +0000
commit77eafbd653d2efac546f2c330d8cf5e84bef2712 (patch)
treef33da0a4570d14882262ea4ee60ad7982afe6b8a /lib/PublicInbox/WatchMaildir.pm
parentfb4bfa102bfa702f13948ac689e54bac9d0084e0 (diff)
downloadpublic-inbox-77eafbd653d2efac546f2c330d8cf5e84bef2712.tar.gz
remove unnecessary ->header_obj calls
We used ->header_obj in the past as an optimization with
Email::MIME.  That optimization is no longer necessary
with PublicInbox::Eml.

This doesn't make any functional difference even if we were to
go back to Email::MIME.  However, it reduces the amount of code
we have and slightly reduces allocations with PublicInbox::Eml.
Diffstat (limited to 'lib/PublicInbox/WatchMaildir.pm')
-rw-r--r--lib/PublicInbox/WatchMaildir.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm
index 814b455b..7d4139a5 100644
--- a/lib/PublicInbox/WatchMaildir.pm
+++ b/lib/PublicInbox/WatchMaildir.pm
@@ -163,9 +163,8 @@ sub import_eml ($$$) {
         # any header match means it's eligible for the inbox:
         if (my $watch_hdrs = $ibx->{-watchheaders}) {
                 my $ok;
-                my $hdr = $eml->header_obj;
                 for my $wh (@$watch_hdrs) {
-                        my @v = $hdr->header_raw($wh->[0]);
+                        my @v = $eml->header_raw($wh->[0]);
                         $ok = grep(/$wh->[1]/, @v) and last;
                 }
                 return unless $ok;