Skip Menu |

This queue is for tickets about the IMAP-Client CPAN distribution.

Report information
The Basics
Id: 30987
Status: new
Priority: 0/
Queue: IMAP-Client

People
Owner: Nobody in particular
Requestors: cpan [...] chmrr.net
Cc:
AdminCc:

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



Subject: APPEND wants a return value
The APPEND command was apparently never finished; it should have a return value. Simple patch is attached. - Alex
Subject: append.patch
diff -ru ./lib/IMAP/Client.pm ../IMAP-Client-0.13/lib/IMAP/Client.pm --- ./lib/IMAP/Client.pm 2007-11-26 15:40:41.000000000 -0500 +++ ../IMAP-Client-0.13/lib/IMAP/Client.pm 2006-09-28 13:43:39.000000000 -0400 @@ -24,7 +24,7 @@ our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); @ISA = qw( Exporter ); -$VERSION = "0.14"; +$VERSION = "0.13"; @EXPORT = qw (); @EXPORT_OK = qw(); %EXPORT_TAGS = (); @@ -1542,7 +1542,7 @@ Unless overridden, append will check for the LITERAL+ capability() atom, and use non-synchronizing literals if supported - otherwise, it will use the standard IMAP dialog. -Returns the new UID if the server supports UIDPLUS, or "0 but true" if the server doesn't. +Upon successful execution, the return of this function depends on the type of variable receiving the data. =cut @@ -1564,16 +1564,13 @@ $flaglist = "()" unless $flaglist; - my @result = ($self->check_capability('LITERAL+')) ? #non-synchronizing literals support - $self->_imap_command("APPEND",quote_once($mailbox)." $flaglist {$messagelen+}\r\n$message") : - $self->_imap_command("APPEND",quote_once($mailbox)." $flaglist {$messagelen}",$message); - return(undef) unless ($result[0]); - - my $last = pop @result; - if ($self->check_capability('UIDPLUS')) { - return $2 if $last =~ /\[APPENDUID (\d+) (\d+)\]/; - } - return "0 but true"; + my @result = ($self->check_capability('LITERAL+')) ? #non-synchronizing literals support + $self->_imap_command("APPEND",quote_once($mailbox)." $flaglist {$messagelen+}\r\n$message") : + $self->_imap_command("APPEND",quote_once($mailbox)." $flaglist {$messagelen}",$message); + + if ($self->check_capability('UIDPLUS')) { + + } } # selected state