From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id B5B3E1FB0F for ; Thu, 11 Mar 2021 10:45:38 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 5/7] imapclient: disable workaround for Mail::IMAPClient 3.43+ Date: Thu, 11 Mar 2021 02:45:36 -0800 Message-Id: <20210311104538.7743-6-e@80x24.org> In-Reply-To: <20210311104538.7743-1-e@80x24.org> References: <20210311104538.7743-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: These fixes are in the recently-released Mail::IMAPClient 3.43: https://metacpan.org/source/PLOBBES/Mail-IMAPClient-3.43/Changes --- lib/PublicInbox/IMAPClient.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/PublicInbox/IMAPClient.pm b/lib/PublicInbox/IMAPClient.pm index 33deee9e..945b10fa 100644 --- a/lib/PublicInbox/IMAPClient.pm +++ b/lib/PublicInbox/IMAPClient.pm @@ -4,17 +4,18 @@ # # The license for this file differs from the rest of public-inbox. # -# Workaround some bugs in upstream Mail::IMAPClient when +# Workaround some bugs in upstream Mail::IMAPClient <= 3.42 when # compression is enabled: # - reference cycle: https://rt.cpan.org/Ticket/Display.html?id=132654 # - read starvation: https://rt.cpan.org/Ticket/Display.html?id=132720 package PublicInbox::IMAPClient; use strict; use parent 'Mail::IMAPClient'; -use Errno qw(EAGAIN); +unless (eval('use Mail::IMAPClient 3.43')) { +require Errno; # RFC4978 COMPRESS -sub compress { +*compress = sub { my ($self) = @_; # BUG? strict check on capability commented out for now... @@ -101,7 +102,7 @@ sub compress { # I/O readiness notifications (select, poll). Refactoring # callers will be needed in the unlikely case somebody wants # to use edge-triggered notifications (EV_CLEAR, EPOLLET). - $! = EAGAIN; + $! = Errno::EAGAIN(); return undef; } @@ -114,6 +115,7 @@ sub compress { }; return $self; -} +}; +} # $Mail::IMAPClient::VERSION < 3.43 1;