Skip Menu |

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

Report information
The Basics
Id: 1766
Status: resolved
Worked: 25 min
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: DJKERNEN__NO_SOLICITING__ [...] cpan.org
Requestors: sopko [...] cs.unc.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.2.6



Date: Tue, 05 Nov 2002 13:36:46 -0500
From: "John W. Sopko Jr." <sopko [...] cs.unc.edu>
To: bug-Mail-IMAPClient [...] rt.cpan.org
Subject: List "" "" command problem
-- John W. Sopko Jr. University of North Carolina email: sopko@cs.unc.edu Computer Science Dept., CB 3175 Phone: 919-962-1844 Sitterson Hall; Room 135 Fax: 919-962-1799 Chapel Hill, NC 27599-3175
I am trying to send the following to the imap server: LIST "" "" To get the servers delimeter characters as specified in rfc2060. I cannot figure out how to quote your list method. Thought this might be a bug. Here is what I tried: Perl call: ---------- $newDelim = $newimap->list("",""); Debug output: ------------- Sending: 2 LIST "" Sent 12 bytes Read: 2 BAD Unexpected extra arguments to List Perl call: ---------- $newDelim = $newimap->list(qq(""),qq("")); Debug output: (needs to be a space between double quotes: "" "") ------------- Sending: 3 LIST """" Sent 14 bytes Read: 3 BAD Missing required argument to List Perl call: ---------- $newDelim = $newimap->list($newimap->Quote(""),$newimap->Quote("")); Debug output: (Returns entire list of mail boxes) ------------- Sending: 2 LIST "" *
[sopko@cs.unc.edu - Tue Nov 5 13:37:00 2002]: Show quoted text
>
This is happening because the list method is trying too hard to intuit what you want to do, and in the case of two empty arguments its just not working. There are two ways to get around this. One is to use the LIST method (which is an unimplemented method and which therefore gets passed pretty much as-is): my @list = $imap->LIST(q/""/,q/""/); # or $imap->LIST(q/"" ""/); But of course if you really just want the separator character, you can just: my $sep = $imap->separator; See http://search.cpan.org/author/DJKERNEN/Mail-IMAPClient-2.2.5/IMAPClient.pm#separator for more information on the separator method. Since there are ways to do what you want here I'm going to mark this ticket resolved. I'll wait a few days first, though, so if you aren't happy you can just update the ticket with an explanation why you don't think it should be closed. I will also take your bug report under advisement and see if I can get the list() method to behave better in future releases. I haven't looked at that method lately but it runs in my mind that's its a terrible hack and it may be due for a rewrite. On the other hand, the method is called by a number of other methods so I might chicken out of a rewrite. ;-) Thanks for reporting this. Cheers, Dave