Re: Handling 'Maildir' folder
[email protected] Tue, 27 Apr 2004 00:49:03 +0200
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Message-ID | <[email protected]> |
I tried to work around the problem using a Mail::Box::Manager.
But it gets worse:
Because I want to update the folder (make it read new messages
and delete those marked for deletions), I call
$manager->open( [...] ) ;
But if I leave the folder open (not calling 'close'), then on the next round, the
program aborts with
WARNING: Folder maildir is already open.
Can't call method "messages" on an undefined value at ./mlhtimportd.pl line 292.
[Method 'messages' is called on the object that is returned by 'open'.]
And if I call 'close', then the program aborts with
Can't call method "lazyPermitted" on an undefined value at /usr/share/perl5/Mail/Box/Dir/Message.pm line 125.
[Probably because the Mail::Message object, passed to the 'process' method (see previous mail),
is destroyed when the folder it belongs to is closed, before the processing is finished ('process'
in fact only queues the messages for delayed processing...).]
How do I get out of this?
Gilles