I'm getting some strange behavior using the "folder->messages(begin,
end) construction. I can work around it, but I think it may be a bug.
Let's say I have exactly ONE mail message in a maildir folder ($folder).
(The message is in the "new" maildir subfolder, and nothing is in the
tmp or cur subfolders). The following code:
my $n = $folder->messages;
print "cnt=$n\n";
$n = $folder->messages('ALL');
print "cnt=$n\n"
$n = $folder->messages(0, 20);
print "cnt=$n\n"
Produces:
cnt=1
cnt=1
Use of uninitialized value in concatenation (.) or string at
./testprocess.pl line 54.
cnt=
Line #54 is the last "print" line (print "cnt=$n\n").
Similarly, if I use @emails = $folder->messages(0, 10), I get an array
of size=2. If I loop through the messages using foreach, the loop will
process twice and the $message object in the second iteration is undefined.
If I use $folder->messages('ALL') or any other construction, this works
fine.
Mike
|