Skip Menu |

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

Report information
The Basics
Id: 66287
Status: resolved
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: PLOBBES [...] cpan.org
Requestors: eco [...] ecocode.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 3.18
Fixed in: 3.28



Subject: flags / Maxcommandlength
I suspect that when Maxcommandlength splits a query, only the last chunk of requested flags is saved in the returned hash. -- Erik
Can you provide any details to support your hunch? What method are you calling and with what arguments? Bugs certainly may exist, but it will be hard to fix them without some supporting details to help isolate the problem you believe you are seeing.
Any chance this is when calling flags() with a large list of messages? If so, then I think this seems plausible.
Assuming this is just against flags() then can you try the following patch? diff --git a/lib/Mail/IMAPClient.pm b/lib/Mail/IMAPClient.pm index d3a034a..8897728 100644 --- a/lib/Mail/IMAPClient.pm +++ b/lib/Mail/IMAPClient.pm @@ -2207,13 +2207,13 @@ sub flags { $msg->cat(@_) if @_; # Send command - $self->fetch( $msg, "FLAGS" ) or return undef; + my $ref = $self->fetch( $msg, "FLAGS" ) or return undef; my $u_f = $self->Uid; my $flagset = {}; # Parse results, setting entry in result hash for each line - foreach my $line ( $self->Results ) { + foreach my $line ( @$ref ) { $self->_debug("flags: line = '$line'"); if ( $line =~ /\* \s+ (\d+) \s+ FETCH \s+ # * nnn FETCH
Mail::IMAPClient 3.28 was released today. If you still see any problems after upgrading, please let me know!