Skip Menu |

This queue is for tickets about the Mail-IMAPClient CPAN distribution.

Report information
The Basics
Id: 114501
Status: rejected
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: PLOBBES [...] cpan.org
Requestors: gdg [...] zplane.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Question on 3.38 done()
Date: Thu, 19 May 2016 15:43:39 -0600
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Glenn Golden <gdg [...] zplane.com>
Hi Phil, First, a tip o' the hat for this module, very nice. It was just what I needed, and nicely documented. Question: Is it guaranteed that upon return from done(), the server is immediately ready to accept non-IDLE mode commands? Glenn Golden
On Thu May 19 17:43:54 2016, gdg@zplane.com wrote: Show quoted text
> Hi Phil, > > First, a tip o' the hat for this module, very nice. It was just what I > needed, and nicely documented.
It's always nice to get positive feedback. Thanks! Show quoted text
> Question: Is it guaranteed that upon return from done(), the server is > immediately ready to accept non-IDLE mode commands?
Well, guarantee is a strong word. Here's the code: sub done { my $self = shift; my $count = shift || $self->Count; # DONE looks like a tag when sent and not already in IDLE $self->_imap_command( { addtag => 0, tag => qr/(?:$count|DONE)/, doretry => 0 }, "DONE" ) or return undef; return $self->Results; } We shouldn't die or exit on just about anything. We return undef if we hit anything appears to be an error condition. With no error, the expectation is that the server responded in a "normal" fashion, leading to the expectation that it is ready for any of the usual IMAP commands to follow. If not, I'd hope it's a server bug and not a client issue (no guarantees :-). (Marking as 'Rejected' as this isn't a bug report per se)
Subject: Re: [rt.cpan.org #114501] Question on 3.38 done()
Date: Sun, 22 May 2016 16:39:29 -0600
To: "Phil Pearl (Lobbes) via RT" <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Glenn Golden <gdg [...] zplane.com>
Hi Phil, Phil Pearl (Lobbes) via RT <bug-Mail-IMAPClient@rt.cpan.org> [2016-05-20 11:00:35 -0400]: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=114501 > > > On Thu May 19 17:43:54 2016, gdg@zplane.com wrote:
> > > > First, a tip o' the hat for this module, very nice. It was just what I > > needed, and nicely documented.
> > It's always nice to get positive feedback. Thanks! >
Yw! Great thing about CPAN community, you can almost always find someone who knows more about what you're trying to do than you do, and has already done it. Very nice work. Show quoted text
> > We shouldn't die or exit on just about anything. We return undef if we hit > anything appears to be an error condition. With no error, the expectation > is that the server responded in a "normal" fashion, leading to the > expectation that it is ready for any of the usual IMAP commands to follow. > If not, I'd hope it's a server bug and not a client issue (no guarantees :-). >
It was a user bug. :) As it turns out, my question about done() was misplaced. The problem I was encountering (that led to the question about done()) actually had nothing to do with done(), it was just a case of an unexpected asynchronous server disconnect and lack of proper defensive code for that. All working properly now. Thanks again for your excellent module. Glenn Golden