Skip Menu |

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

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

People
Owner: PLOBBES [...] cpan.org
Requestors: jason [...] long.name
Cc:
AdminCc:

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



Subject: append_file() does not interpret $date argument as expected
The documentation for $imap->append_file() lists $date as one of the arguments it accepts. However, it does not describe the use of this parameter, so I assumed it worked the same was as the $date argument of $imap->append_string(). I was wrong. It seems, from looking at the source, that the $date argument in append_file() is really $use_filetime, a boolean that indicates whether to use the timestamp of the file as the internal date, or not. I would like the documentation of Mail::IMAPClient updated to explain this. Thanks.
Agreed. The document is poor/non-existent for the use of date with append_file and it is inconsistent with append_string. This looks to be a feature added in early 3.x code and we definitely should do something about this. My thoughts: * update document to describe usage * consider overloading $date usage: if $date eq "1" then use the timestamp of the file elsif $date then do something smarter perhaps based on a fix for https://rt.cpan.org/Ticket/Display.html?id=61068 (append_string can invalidate a good $date if $date not wrapped in double quotes) Thanks for filing to bug, I'll see what I can do to clean this up in the next release.
I have just committed a patch to sync up behavior with append_string. To see the changes in git, see: https://sourceforge.net/p/mail- imapclient/git/ci/27436a2422a1eabbed28b7761ca5dedaf0a2b7ef/ Here's the changelog comment: commit 27436a2422a1eabbed28b7761ca5dedaf0a2b7ef Author: Phil Pearl (Lobbes) Date: Sat Jan 22 23:27:42 2011 -0500 - *rt.cpan.org#60945: append_file() does not interpret $date as expected $date should now be 1 (to use the file mtime) or a valid RFC3501 date pod updated to reflect new behavior I'll hopefully have a new release out within a few weeks.
Mail::IMAPClient 3.26 has been released to CPAN. Please install it if you get a chance and let me know if you run into any more problems, thanks!