Skip Menu |

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

Report information
The Basics
Id: 66001
Status: resolved
Priority: 0/
Queue: Mail-Box

People
Owner: Nobody in particular
Requestors: foss-ml [...] wm1.at
Cc:
AdminCc:

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



Subject: Mail::Box::IMAP4: create => 1 fails on because of an undefined value
I'm trying to use Mail::Box to move some mail to an IMAP server. Unfortunately, this fails: ./create_bug.pl ERROR: Couldn't select IMAP4 folder newfolder Use of uninitialized value in string eq at /usr/share/perl5/Mail/Transport/IMAP4.pm line 205. ERROR: Couldn't select IMAP4 folder newfolder Can't call method "createFolder" on an undefined value at /usr/share/perl5/Mail/Box/IMAP4.pm line 90. Is there any known working way within Mail::Box to create non-existent folders on the IMAP server?
Subject: create_bug.pl
#!/usr/bin/perl use strict; use Mail::Box::IMAP4; my $folder = "newfolder"; my %args = ( server_name => "127.0.0.1", username => "xxxxxx", password => "xxxxxx", access => "rw"); my $imap = Mail::Box::IMAP4->new(%args, folder => $folder, create => 1); if(!$imap) { die "failed to establish connection"; }
From: foss-ml [...] wm1.at
A fix for the first undefined value problem is attached. Show quoted text
> ERROR: Couldn't select IMAP4 folder newfolder > Use of uninitialized value in string eq at > /usr/share/perl5/Mail/Transport/IMAP4.pm line 205.
Subject: MTI_folder-undefined.diff
--- /usr/share/perl5/Mail/Transport/IMAP4.pm.orig 2011-02-21 17:46:33.000000000 +0100 +++ /usr/share/perl5/Mail/Transport/IMAP4.pm 2011-02-21 17:59:28.000000000 +0100 @@ -202,7 +202,7 @@ my $name = shift; - if(exists $self->{MTI_folder} && $name eq $self->{MTI_folder}) + if(defined $self->{MTI_folder} && $name eq $self->{MTI_folder}) { $self->log(DEBUG => "Folder $name already selected."); return $name; }
Subject: Re: [rt.cpan.org #66001] Mail::Box::IMAP4: create => 1 fails on because of an undefined value
Date: Tue, 22 Feb 2011 00:01:51 +0100
To: Willi Mann via RT <bug-Mail-Box [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* Willi Mann via RT (bug-Mail-Box@rt.cpan.org) [110221 16:14]: Show quoted text
> Mon Feb 21 11:14:24 2011: Request 66001 was acted upon. > Transaction: Ticket created by wmann > Queue: Mail-Box > Subject: Mail::Box::IMAP4: create => 1 fails on because of an undefined value > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=66001 > > > I'm trying to use Mail::Box to move some mail to an IMAP server. > Unfortunately, this fails:
The IMAP4 implementation is not complete: I stopped developing it when I had discovered many problems in Mail::IMAPClient. Once that module got fixed, I had no desire to spend time to fix the MailBox part... However: I do accept patches. Yours is included in next release. -- Thanks, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
patch included in 2.098, release march 2011