about summary refs log tree commit homepage
path: root/lib/PublicInbox/Thread.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-05-02 03:20:22 +0000
committerEric Wong <e@80x24.org>2016-05-02 17:57:07 +0000
commit16d1d110117a2521fcc3304541c937385febd66b (patch)
treefa69aa37cc5ab1fd2eac4b089cc4e838fcb55bb5 /lib/PublicInbox/Thread.pm
parent98e024acdb909cd9754ed5f107a0063350c103dd (diff)
downloadpublic-inbox-16d1d110117a2521fcc3304541c937385febd66b.tar.gz
Broken threads should be exposed to hopefully encourage people to
use proper mail clients which set In-Reply-To headers.
Diffstat (limited to 'lib/PublicInbox/Thread.pm')
-rw-r--r--lib/PublicInbox/Thread.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/PublicInbox/Thread.pm b/lib/PublicInbox/Thread.pm
index 781fffff..44a565ad 100644
--- a/lib/PublicInbox/Thread.pm
+++ b/lib/PublicInbox/Thread.pm
@@ -12,6 +12,20 @@ package PublicInbox::Thread;
 use strict;
 use warnings;
 use base qw(Mail::Thread);
+# WARNING! both these Mail::Thread knobs were found by inspecting
+# the Mail::Thread 2.55 source code, and we have some monkey patches
+# in PublicInbox::Thread to fix memory leaks.  Since Mail::Thread
+# appears unmaintained, I suppose it's safe to depend on these
+# variables for now:
+{
+        no warnings 'once';
+        # we want strict threads to expose (and hopefully discourage)
+        # use of broken email clients
+        $Mail::Thread::nosubject = 1;
+        # Keep ghosts with only a single direct child,
+        # don't hide that there may be missing messages.
+        $Mail::Thread::noprune = 1;
+}
 
 if ($Mail::Thread::VERSION <= 2.55) {
         eval q(sub _container_class { 'PublicInbox::Thread::Container' });