Date: | Wed, 19 Jan 2005 21:41:40 -0500 |
From: | Tom Allison <tallison [...] tacocat.net> |
To: | bug-Mail-IMAPClient [...] rt.cpan.org |
Subject: | Mail::IMAPClient "bug"?? |
Using the following block of code:
my $IMAP = Mail::IMAPClient->new( Server => 'mail.domain.net',
User => 'mouse',
Password => 'cheese',
Uid => 1 );
foreach my $f (sort $IMAP->folders) {
print $f,"\n";
# $IMAP->examine($f);
my $ref = $IMAP->status($f, "RECENT UNSEEN MESSAGES");
print join("", @{$ref}),"\n----\n";
my @arr = ($$ref[1] =~ /([\w\.]+)\" \(\w+ (\d+) \w+ (\d+) \w+ (\d+)/o);
print $$ref[1],"\n";
print join("\t", @arr),"\n";
my @f = $IMAP->status($f, "RECENT UNSEEN MESSAGES");
print join("", @f),"\n";
next;
}
Returns different answers for the array reference and the array on the
same 'status' call. the reference includes three lines, the array has
only the one.
Drafts
25 STATUS Drafts (RECENT UNSEEN MESSAGES)
* STATUS "Drafts" (MESSAGES 3 RECENT 0 UNSEEN 2)
25 OK Status completed.
----
* STATUS "Drafts" (MESSAGES 3 RECENT 0 UNSEEN 2)
Drafts 3 0 2