diff options
author | Eric Wong <e@80x24.org> | 2015-08-18 02:05:32 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-08-18 02:05:32 +0000 |
commit | 64ed451c683eba28e5b9ab4b750e9bcec2f33c97 (patch) | |
tree | d603349c5372ab4e585a25059935a17bfa4d017e | |
parent | 12a6897cbe0b825f8bf34416432dba3cecebde90 (diff) | |
download | public-inbox-64ed451c683eba28e5b9ab4b750e9bcec2f33c97.tar.gz |
Yay for monkey patching! ref: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795913 ref: https://rt.cpan.org/Ticket/Display.html?id=106498
-rw-r--r-- | lib/PublicInbox/Thread.pm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/PublicInbox/Thread.pm b/lib/PublicInbox/Thread.pm index 58efb8dc..92404faa 100644 --- a/lib/PublicInbox/Thread.pm +++ b/lib/PublicInbox/Thread.pm @@ -1,5 +1,10 @@ # subclass Mail::Thread and use this to workaround a memory leak # Based on the patch in: https://rt.cpan.org/Public/Bug/Display.html?id=22817 +# +# Additionally, workaround for a bug where $walk->topmost returns undef: +# - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795913 +# - https://rt.cpan.org/Ticket/Display.html?id=106498 +# # License differs from the rest of public-inbox (but is compatible): # This library is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. @@ -33,4 +38,19 @@ use base qw(Mail::Thread::Container); use Scalar::Util qw(weaken); sub parent { @_ == 2 ? weaken($_[0]->{parent} = $_[1]) : $_[0]->{parent} } +sub topmost { + $_[0]->SUPER::topmost || PublicInbox::Thread::CPANRTBug106498->new; +} + +# ref: +# - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795913 +# - https://rt.cpan.org/Ticket/Display.html?id=106498 +package PublicInbox::Thread::CPANRTBug106498; +use strict; +use warnings; + +sub new { bless {}, $_[0] } + +sub simple_subject {} + 1; |