r842 - in packages/libmail-box-perl: tags trunk trunk/debian trunk/lib/Mail trunk/lib/Mail/Box trunk/lib/Mail/Box/Dbx trunk/lib/Mail/Box/Dir trunk/lib/Mail/Box/File trunk/lib/Mail/Box/IMAP4 trunk/lib/Mail/Box/Locker trunk/lib/Mail/Box/MH trunk/lib/Mail/Box/Maildir trunk/lib/Mail/Box/Mbox trunk/lib/Mail/Box/Message trunk/lib/Mail/Box/Net trunk/lib/Mail/Box/POP3 trunk/lib/Mail/Box/Parser trunk/lib/Mail/Box/Search trunk/lib/Mail/Box/Thread trunk/lib/Mail/Box/Tie trunk/lib/Mail/Message trunk/lib/Mail/Message/Body trunk/lib/Mail/Message/Construct trunk/lib/Mail/Message/Convert trunk/lib/Mail/Message/Field trunk/lib/Mail/Message/Head trunk/lib/Mail/Message/Replace trunk/lib/Mail/Message/TransferEnc trunk/lib/Mail/Message/Wrapper trunk/lib/Mail/Transport trunk/scripts trunk/tests trunk/tests/11field trunk/tests/13body trunk/tests/14fieldu trunk/tests/40mbox trunk/tests/44imap trunk/tests/52manager

Gunnar Wolf gwolf at costa.debian.org
Sun Jul 17 08:09:00 UTC 2005


Author: gwolf
Date: 2005-03-30 18:00:59 +0000 (Wed, 30 Mar 2005)
New Revision: 842

Added:
   packages/libmail-box-perl/tags/debian_version_2_055-1/
   packages/libmail-box-perl/trunk/lib/Mail/Box/Collection.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Collection.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Identity.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Identity.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Manage/
   packages/libmail-box-perl/trunk/lib/Mail/Server.pm
   packages/libmail-box-perl/trunk/lib/Mail/Server.pod
   packages/libmail-box-perl/trunk/lib/Mail/Server/
   packages/libmail-box-perl/trunk/tests/10reporter/
   packages/libmail-box-perl/trunk/tests/11field/40wrap.t
   packages/libmail-box-perl/trunk/tests/14fieldu/31struct.t
   packages/libmail-box-perl/trunk/tests/44imap/30flags.t
   packages/libmail-box-perl/trunk/tests/52manager/20user.t
   packages/libmail-box-perl/trunk/tests/52manager/30collect.t
   packages/libmail-box-perl/trunk/tests/60imap/
Removed:
   packages/libmail-box-perl/trunk/debian_version_2_055-1/
   packages/libmail-box-perl/trunk/lib/Mail/Box/Search/IMAP.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Search/IMAP.pod
   packages/libmail-box-perl/trunk/tests/10report/
Modified:
   packages/libmail-box-perl/trunk/ChangeLog
   packages/libmail-box-perl/trunk/MANIFEST
   packages/libmail-box-perl/trunk/META.yml
   packages/libmail-box-perl/trunk/Makefile.PL
   packages/libmail-box-perl/trunk/TODO.v2
   packages/libmail-box-perl/trunk/debian/changelog
   packages/libmail-box-perl/trunk/lib/Mail/Box-Cookbook.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box-Index.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box-Overview.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx/Message.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx/Message.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Dir.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Dir.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Dir/Message.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Dir/Message.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/FastScalar.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/FastScalar.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/File.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/File.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/File/Message.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/File/Message.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Head.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Head.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Message.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Message.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Locker.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Locker.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/DotLock.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/DotLock.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Flock.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Flock.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Multi.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Multi.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/NFS.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/NFS.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/POSIX.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/POSIX.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/MH.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/MH.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Index.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Index.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Labels.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Labels.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Message.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Message.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir/Message.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir/Message.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Manager.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Manager.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox/Message.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox/Message.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Message.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Message.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Message/Destructed.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Message/Destructed.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Net.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Net.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Net/Message.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Net/Message.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/POP3.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/POP3.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/POP3/Message.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/POP3/Message.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Parser.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Parser.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Parser/Perl.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Parser/Perl.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Search.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Search.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Search/Grep.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Search/Grep.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Search/SpamAssassin.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Search/SpamAssassin.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Manager.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Manager.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Node.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Node.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Tie.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Tie.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/ARRAY.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/ARRAY.pod
   packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/HASH.pm
   packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/HASH.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Construct.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Construct.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Delayed.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Delayed.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Encode.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Encode.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/File.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/File.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Lines.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Lines.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Multipart.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Multipart.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Nested.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Nested.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/String.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Body/String.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Bounce.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Bounce.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Build.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Build.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Forward.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Forward.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Read.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Read.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Rebuild.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Rebuild.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Reply.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Reply.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Text.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Text.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Convert.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Convert.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/Html.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/Html.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatPS.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatPS.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatText.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatText.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MailInternet.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MailInternet.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MimeEntity.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MimeEntity.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/TextAutoformat.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/TextAutoformat.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Dummy.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Dummy.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/AddrGroup.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/AddrGroup.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Address.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Address.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Addresses.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Addresses.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Attribute.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Attribute.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Fast.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Fast.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Flex.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Flex.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Full.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Full.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Structured.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Structured.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/URIs.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/URIs.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Unstructured.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Unstructured.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Complete.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Complete.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Delayed.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Delayed.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/FieldGroup.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/FieldGroup.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ListGroup.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ListGroup.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Partial.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Partial.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ResentGroup.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ResentGroup.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/SpamGroup.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/SpamGroup.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Subset.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Subset.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Part.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Part.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailHeader.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailHeader.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailInternet.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailInternet.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Base64.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Base64.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Binary.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Binary.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/EightBit.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/EightBit.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/QuotedPrint.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/QuotedPrint.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/SevenBit.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/SevenBit.pod
   packages/libmail-box-perl/trunk/lib/Mail/Message/Wrapper/SpamAssassin.pm
   packages/libmail-box-perl/trunk/lib/Mail/Message/Wrapper/SpamAssassin.pod
   packages/libmail-box-perl/trunk/lib/Mail/Reporter.pm
   packages/libmail-box-perl/trunk/lib/Mail/Reporter.pod
   packages/libmail-box-perl/trunk/lib/Mail/Transport.pm
   packages/libmail-box-perl/trunk/lib/Mail/Transport.pod
   packages/libmail-box-perl/trunk/lib/Mail/Transport/Exim.pm
   packages/libmail-box-perl/trunk/lib/Mail/Transport/Exim.pod
   packages/libmail-box-perl/trunk/lib/Mail/Transport/IMAP4.pm
   packages/libmail-box-perl/trunk/lib/Mail/Transport/IMAP4.pod
   packages/libmail-box-perl/trunk/lib/Mail/Transport/Mailx.pm
   packages/libmail-box-perl/trunk/lib/Mail/Transport/Mailx.pod
   packages/libmail-box-perl/trunk/lib/Mail/Transport/POP3.pm
   packages/libmail-box-perl/trunk/lib/Mail/Transport/POP3.pod
   packages/libmail-box-perl/trunk/lib/Mail/Transport/Qmail.pm
   packages/libmail-box-perl/trunk/lib/Mail/Transport/Qmail.pod
   packages/libmail-box-perl/trunk/lib/Mail/Transport/Receive.pm
   packages/libmail-box-perl/trunk/lib/Mail/Transport/Receive.pod
   packages/libmail-box-perl/trunk/lib/Mail/Transport/SMTP.pm
   packages/libmail-box-perl/trunk/lib/Mail/Transport/SMTP.pod
   packages/libmail-box-perl/trunk/lib/Mail/Transport/Send.pm
   packages/libmail-box-perl/trunk/lib/Mail/Transport/Send.pod
   packages/libmail-box-perl/trunk/lib/Mail/Transport/Sendmail.pm
   packages/libmail-box-perl/trunk/lib/Mail/Transport/Sendmail.pod
   packages/libmail-box-perl/trunk/scripts/mailbox2html
   packages/libmail-box-perl/trunk/test.pl
   packages/libmail-box-perl/trunk/tests/11field/20fast.t
   packages/libmail-box-perl/trunk/tests/13body/40multip.t
   packages/libmail-box-perl/trunk/tests/14fieldu/10full.t
   packages/libmail-box-perl/trunk/tests/14fieldu/30unstr.t
   packages/libmail-box-perl/trunk/tests/40mbox/50create.t
   packages/libmail-box-perl/trunk/tests/52manager/10open.t
   packages/libmail-box-perl/trunk/tests/Tools.pm
Log:
New upstream version


Copied: packages/libmail-box-perl/tags/debian_version_2_055-1 (from rev 841, packages/libmail-box-perl/trunk/debian_version_2_055-1)

Modified: packages/libmail-box-perl/trunk/ChangeLog
===================================================================
--- packages/libmail-box-perl/trunk/ChangeLog	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/ChangeLog	2005-03-30 18:00:59 UTC (rev 842)
@@ -7,12 +7,344 @@
       usually limited to areas which are under development.  Mail::Box
       is a huge module, so there is always a lot of activity.
 
-wat als appendMessage faalt?
-filehandle als bron folder?
-MH index in append mode niet lezen.
-gebruik Return-Path voor reply()
-flock() op flock(): zelfde process op AIX en Solaris
+version 2.060: Tue Mar 15 22:02:34 CET 2005
 
+	Fixes:
+
+	- Mail::Transport::IMAP4 crash on getFlags(). Reported by [Tom Allison]
+
+	- Mail::Transport::IMAP4 authenticate now uses server's
+	  reported capabilities.  On the path paved by [Tom Allison]
+
+	- Mail::Message::Field::toDate() now works around %z interpretation
+	  as textual time-zones when there are blanks in the name.
+	  [aa26 at mail.ru]
+
+	- Pod updage for Mail::Box::Dbx [Ralf Valerien]
+
+	- open('|-') does a fork, so a failure should result in an exit,
+	  not a return.  Found a few times in Mail::Transport::*, and
+	  discovered by [Slaven Rezic]
+
+	- $msg->send didn't pass the options correctly to the sending
+	  object. Reported by [Franck Richard].
+
+	- Mail::Transport::POP3 did only try APOP in AUTO mode. Found
+	  by [Markus Spann].
+
+	- Mail::Box::Manager::decodeFolderURL leaves the foldername
+	  starting with a slash.  That slash should be removed when
+	  the URL starts with a protocol ne 'file'. [Tom Allison]
+
+	- scripts/mailbox2html used setLabel(), which got replaced by
+	  label() a long time ago. Reported by [Alain Veylit]
+
+	- Mail::Message::Field::Attribute used Mail::Reporter without
+	  having it as base class.  Rewritten to have it that way.
+	  Reported by [Russell Mosemann]
+
+	- Removed the two uses of $& in reg-exps, which slows-down all
+	  regexp matches in older Perl versions.  Patch supplied by
+	  [jgmyers]
+
+	Improvements:
+
+	- Documented Mail::Box::Manager::open(authenticate) as
+	  suggested by [Tom Allison]
+
+	- $msg->bounce() without arguments now croaks. [Slaven Rezic]
+
+version 2.059: Tue Nov 30 19:50:42 CET 2004
+
+	Interface changes:
+
+	- Mail::Transport::IMAP4::flagsToLabels expects new first argument
+	  'REPLACE', 'SET', or 'CLEAR'.
+
+	Fixes:
+
+	- Installer didn't ask for optional Time::Hires
+
+	- [Anthony D. Urso] fixed an endless loop in study() for
+	  fields ending on blanks.
+
+	- [Russell Mosemann] found a different problem, in about
+	  the same line as the previous fix.
+
+	- Fixed memory leak in administration of messages in folder.
+
+	Improvements:
+
+	- $msg->printStructure is less strict on the format of the
+	  indentation: any white-space in it is sufficient.
+
+	- $msg->printStructure(undef) will return the structure as
+	  string.
+
+	- new method Mail::Server::IMAP4::Fetch::printStructure()
+	  for debugging purposes.
+
+version 2.058: Wed Sep 22 14:44:32 CEST 2004
+
+	Interface changes:
+
+	- [Andy Maas] rewrote Mail::Box::FastScalar, to boost performance.
+	  various bodyAsList() methods now prduce ref-arrays.  Shouldn't
+	  affect user programs. Requires Mail::Box::Parser::C v3.006
+
+	Fixes:
+
+	- [Jason Woodward ] had to wait much too long to get his
+	  twin-POP open problem solved.  Now, only one POP connection
+	  will be opened.  This may speed-up other programs as well.
+
+	- [Mike Mimic] foudn that the new INIT block in Mail::Reporter
+	  did not work well with his web-application.  Changed it into
+	  BEGIN.
+
+	- [Mail Minic] Mail::Transport::Exim did not handle strings
+	  as from address correctly.
+
+	- [Anonymous via RT] Use ExtUtils::MakeMaker::prompt() instead
+	  of own ask() in Makefile.PL, so MailBox can be installed with
+	  CPANPLUS.
+
+	- [aa29] $head->isMultipart did not return boolean in list
+	  context.
+
+	- [DH] removed INIT block from Mail::Reporter, which complains
+	  in Apache.
+
+	- [aa29] Mail::Box::MH->new failed because of initiation order
+
+	- pop3 folders do not need (have) a name, but Mail::Box::Manager::open
+	  required one.  Accidentally, sometimes that worked, because $ENV{MAIL}
+	  was used as default, however, that could cause various problems.
+
+	- {Tom Allison] found-out that imap was not autoloaded my the
+	  Mail::Box::Manager.
+
+	Improvements:
+
+	- warning message "Folder does not exist, ..." avoided when
+	  folder is opened for deletion.
+
+	- added Mail::Box::Identity::open()
+
+	- added Mail::Box::nrMessages() for simplification
+
+	- [Alessandro Zummo] showed me that docs about
+	     "why $head->delete($field) doesn't aways work" were needed.
+	  It's a nasty reference counting problem.
+
+version 2.057: Thu Aug 26 14:31:34 CEST 2004
+
+	Interface change:
+
+	- Moved the new Mail::Box::IMAP4::Fetch to Mail::Server::IMAP4::Fetch,
+	  which is a more logical name: part of a full server implementation.
+
+	- Moved the unusable module Mail::Box::Search::IMAP4 over to
+	  Mail::Server::IMAP4::Search... but still not implemented ;-)
+
+	- You have to add (share => 0) to $msg->moveTo if the source message
+	  can get undeleted in your program (for instance in a user
+	  application).
+
+	- Mail::Reporter->report(...) will return strings without \n. Sporadic
+	  locations where log() was called with trailing \n are removed.
+
+	- Opening a folder which is already open is considered an error (was
+	  warning) by the manager.
+
+	Fixes:
+
+	- [Jan Martin Mathiassen] add IO::File to Mail::Box::Dir::Message
+
+	- [Torsten Luettgert] found that field labels like '-' where not
+	  beautified correctly with wellformedName.
+
+	- Changed '.' from most preferred folder directory for the manager
+	  into the least preferred.
+
+	- $field->setWrapLength only worked for "fast" fields.  Tests in
+	  tests/11field/40wrap.t
+
+	- [Mike Mimic] showed that constructing unstructured "full" fields
+	  was broken.
+
+	- Mail::Box::POP3::delete() will not take any action.  Deleting all
+	  contained messages was not consequent.
+
+	Improvements:
+
+	- [David A Golden] demonstrated the need for $head->wrap(<size>)
+
+	- $folder->coerce($message) will only call MSGTYPE->coerce($message)
+	  when not a MSGTYPE yet.
+
+	- Mail::Box::Message::coerce() could be removed: no-op.
+
+	- Reimplemented folder->delete(), which is not reading the messages
+	  before deletion, but bluntly removes the folder in the most
+	  Efficient way. You probably want the new option 'recursive'.
+
+	- Mail::Box::new(access) now has mode 'd', which speeds up removal
+	  of folders.  Used by $folder->delete().
+
+	- Mail::Box::IMAP4 now supports deletion of a folder (untested)
+
+	- $folder->copyTo/moveTo and $msg->copyTo can have option 'share'
+	  which tries to use hardlinks i.s.o. clone() to put a message in
+	  a different folder.  Only available for some M<Mail::Box::Dir>
+	  folders.
+
+	- Mail::Message::clone() now accepts shallow_head and shallow_body
+	  arguments which avoid deep-cloning.
+
+	- Added references to the Netzwert folder type, which got implemented,
+	  but not released as GPL (yet?)
+
+	- Increased the status of the IMAP folder client from alpha to beta.
+
+	- New methods
+             Mail::Box::Manager::folderdir()
+	     Mail::Box::Manager::defaultFolderType()
+
+	- New methods
+	     Mail::Box::topFolderWithMessages()
+
+	- Moved tests/44imap/40fetch.t to tests/60imap/10fetch.t
+
+	- Mail::Box::nameOfSubFolder() now can be used as class method.
+
+	- New, specialized folder manager
+	     Mail::Box::Manage::User   manager with user knowledge
+	  tests in tests/52manager/20user.t
+	  explanation added to Mail::Box::Manager, about the two kinds
+	  of managers.
+
+	- New classes to administer folders, even when not opened
+	     Mail::Box::Identity       info about (possibly unopened) folder
+	     Mail::Box::Collection     info about groups of folders
+	  tests in tests/52manager/30collect.t
+
+	- New classes to implement parts of an IMAP4 server
+	     Mail::Server              place-holder
+	     Mail::Server::IMAP4       place-holder
+	     Mail::Server::IMAP4::List
+	  tests in tests/60imap/20list.t
+
+	- Split tests/10report/10errors.t into
+	  tests/10reporter/10errors.t and tests/10reporter/20reports.t
+
+	- Mail::Reporter::defaultTrace can now set a callback to catch
+	  each log/trace message.  Tests in tests/10reporter/30callback.t
+
+	- [chris] Mail::Message::Field::wellformedName() will upper-case
+	  *-ID as part in the fieldname.
+
+	- [M M] tried to user MBMbox->create and expected it to open the
+	  folder at the same time.  Documentation problem: moved the
+	  method from "constructors" to "internal".  Did the same for
+	  "foundIn".
+
+	- Produce an error if people try to build Mail::Box::*
+	  messages directly.
+
+	- Many improvements on User::Identity module.  MailBox requires
+	  version UI 0.90 now.
+
+version 2.056: Sat Jul 31 13:28:29 CEST 2004
+
+	Interface change:
+
+	- [Wiggins d Anconia] explained that combining MailBox with forks
+	  may cause non-unique message-ids to be created.  To solve this,
+	  the $head->messageIdPrefix() had to be rewritten.  MessageIDs will
+	  look differently now.  [No problems expected for existing programs]
+
+	Fixes:
+
+	- [Jeff Squyres] silenced warnings by guessTimestamp() and
+	  recvstamp() when no Date nor Received fields are present.
+
+	- [August] Mail::Box->new(lock_wait) option not correctly passed
+	  to Locker object.
+
+	- [Mime Mimic] noticed that a message reply used "sender", not
+          "From" addresses when no "Reply-To" field is present. This is
+          not according RFC2822.  Sender should never be used.
+
+	- [Jason Woodward] found a $_ localization error in POP3, which
+	  could result in "Can't call method "xxx" without a package or
+	  object reference" errors.
+
+	- [Carlos Perez] SpamAssasin's message wrapper method get_header()
+	  should return all field bodies with a certain name in list context.
+
+	- [Jason Woodward] $msg->shortString was broken.
+
+	- [Todd Richmond] discovered that un-quoted attribute values
+	  consumed the semi-colon separator in Mail::Message::Field.
+
+	- Content-Transfer-Encoding and Content-Disposition fields were
+	  ignored when specified with Mail::Message->build().  Now they
+	  will be applied to the create body AFTER the body is constructed
+	  based on default rules.
+
+	- [Todd Richmond] discovered that Base64 decoding should not be
+	  done on per line basis, because some lines may not have mod4
+	  number of characters (especially in virusses).  The RFC is not
+	  clear about it, so... Mail::Message::TransferEnc::Base64 is
+	  changed (again)
+
+	Improvements:
+
+	- [Rich Caller] suggested to change blanks in ill-formated
+	  message-ids into blanks.  Apparently, some applications are
+	  doing that.
+
+	- Mail::Message::Field::Unstructured now supportss character-set
+	  encodings, by request of [Mike Mimic]
+
+	- [Mike Mimic] made an unexpected abuse of $head->build().  It is
+	  now supported that ready field objects can be passed.  A warning
+	  is produced when you accidentally pass  field_name => $field_object
+	  (which should be: field_name => field_content  or simply
+	  $field_object.
+
+	- [Mike Mimic] Some link errors in the front HTML documentation page.
+
+	- Added $head->printSelected(FILE, patterns) as simple way to
+	  produce field subsets.
+
+	- Added support for label 'passed', which means that the message
+	  was used for forward/bounce/resend.
+
+	- Added Maildir message flag P='passed' (uncommon)
+
+	- Changed flag handling implementation in Mail::Transport::IMAP4.
+	  Tests are in tests/44imap/30flags.t
+
+	- $body->dispositionFilename can be used without directory name.
+
+	- Attachments auto-discompose as 'inline' for texts and `attachement'
+	  for binaries.
+
+	- Added Mail::Box::IMAP4::Fetch with tests in tests/44imap/40fetch.t
+	  which provides body/bodystructure/envelope syntax conversions.
+
+	- New $field->attributes (to list fields of all attributes) for
+	  Mail::Message::Field.
+
+	- Added description of differences between MIME::Entity::build()
+	  and Mail::Message::build().
+
+	- Mail::Message::Field::Structured can now be used for general
+	  structured fields with attributes, like Content-Type and
+	  Content-Description.
+
 version 2.055: Sun May 16 15:41:59 CEST 2004
 
 	Fixes:
@@ -128,6 +460,10 @@
 	- Mail::Transport::Exim takes exim4 binary with preference over
 	  usual exim MTA, on request by [Mike Mimic]
 
+	- [Mitar] Mail::Transport::Sendmail starts sendmail with -ti, not
+	  -it, which helps exim... either the default sendmail as the
+	  specialized Mail::Transport::Exim module will work now with exim.
+
 version 2.053: Thu Dec  4 00:13:50 CET 2003
 
 	Fixes:

Modified: packages/libmail-box-perl/trunk/MANIFEST
===================================================================
--- packages/libmail-box-perl/trunk/MANIFEST	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/MANIFEST	2005-03-30 18:00:59 UTC (rev 842)
@@ -21,6 +21,8 @@
 lib/Mail/Box-Overview.pod
 lib/Mail/Box.pm
 lib/Mail/Box.pod
+lib/Mail/Box/Collection.pm
+lib/Mail/Box/Collection.pod
 lib/Mail/Box/Dbx.pm
 lib/Mail/Box/Dbx.pod
 lib/Mail/Box/Dbx/Message.pm
@@ -41,6 +43,8 @@
 lib/Mail/Box/IMAP4/Head.pod
 lib/Mail/Box/IMAP4/Message.pm
 lib/Mail/Box/IMAP4/Message.pod
+lib/Mail/Box/Identity.pm
+lib/Mail/Box/Identity.pod
 lib/Mail/Box/Locker.pm
 lib/Mail/Box/Locker.pod
 lib/Mail/Box/Locker/DotLock.pm
@@ -65,6 +69,8 @@
 lib/Mail/Box/Maildir.pod
 lib/Mail/Box/Maildir/Message.pm
 lib/Mail/Box/Maildir/Message.pod
+lib/Mail/Box/Manage/User.pm
+lib/Mail/Box/Manage/User.pod
 lib/Mail/Box/Manager.pm
 lib/Mail/Box/Manager.pod
 lib/Mail/Box/Mbox.pm
@@ -91,8 +97,6 @@
 lib/Mail/Box/Search.pod
 lib/Mail/Box/Search/Grep.pm
 lib/Mail/Box/Search/Grep.pod
-lib/Mail/Box/Search/IMAP.pm
-lib/Mail/Box/Search/IMAP.pod
 lib/Mail/Box/Search/SpamAssassin.pm
 lib/Mail/Box/Search/SpamAssassin.pod
 lib/Mail/Box/Thread/Manager.pm
@@ -220,6 +224,16 @@
 lib/Mail/Message/Wrapper/SpamAssassin.pod
 lib/Mail/Reporter.pm
 lib/Mail/Reporter.pod
+lib/Mail/Server.pm
+lib/Mail/Server.pod
+lib/Mail/Server/IMAP4.pm
+lib/Mail/Server/IMAP4.pod
+lib/Mail/Server/IMAP4/Fetch.pm
+lib/Mail/Server/IMAP4/Fetch.pod
+lib/Mail/Server/IMAP4/List.pm
+lib/Mail/Server/IMAP4/List.pod
+lib/Mail/Server/IMAP4/Search.pm
+lib/Mail/Server/IMAP4/Search.pod
 lib/Mail/Transport.pm
 lib/Mail/Transport.pod
 lib/Mail/Transport/Exim.pm
@@ -246,11 +260,14 @@
 test.pl
 tests/01platform/10crlf.t
 tests/01platform/Definition.pm
-tests/10report/10errors.t
-tests/10report/Definition.pm
+tests/10reporter/10errors.t
+tests/10reporter/20reports.t
+tests/10reporter/30callback.t
+tests/10reporter/Definition.pm
 tests/11field/10cfws.t
 tests/11field/20fast.t
 tests/11field/30flex.t
+tests/11field/40wrap.t
 tests/11field/Definition.pm
 tests/12head/10create.t
 tests/12head/30partial.t
@@ -263,6 +280,7 @@
 tests/14fieldu/10full.t
 tests/14fieldu/20attr.t
 tests/14fieldu/30unstr.t
+tests/14fieldu/31struct.t
 tests/14fieldu/40parse.t
 tests/14fieldu/50userid.t
 tests/14fieldu/51addr.t
@@ -322,6 +340,7 @@
 tests/43pop3/server
 tests/44imap/10read.t
 tests/44imap/20write.t
+tests/44imap/30flags.t
 tests/44imap/Definition.pm
 tests/45dbx/10read.t
 tests/45dbx/Definition.pm
@@ -341,6 +360,8 @@
 tests/51folder/Definition.pm
 tests/52manager/10open.t
 tests/52manager/11urlopen.t
+tests/52manager/20user.t
+tests/52manager/30collect.t
 tests/52manager/Definition.pm
 tests/53threads/10single.t
 tests/53threads/Definition.pm
@@ -352,6 +373,9 @@
 tests/55locking/40posix.t
 tests/55locking/90multi.t
 tests/55locking/Definition.pm
+tests/60imap/10fetch.t
+tests/60imap/20list.t
+tests/60imap/Definition.pm
 tests/80msgconv/10mailint.t
 tests/80msgconv/20mimeent.t
 tests/80msgconv/Definition.pm

Modified: packages/libmail-box-perl/trunk/META.yml
===================================================================
--- packages/libmail-box-perl/trunk/META.yml	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/META.yml	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,13 +1,14 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Mail-Box
-version:      2.055
+version:      2.060
 version_from: lib/Mail/Box.pm
 installdirs:  site
 requires:
     Date::Parse:                   0
     Digest::HMAC_MD5:              0
     Errno:                         0
+    File::Remove:                  0.2
     File::Spec:                    0.7
     IO::Scalar:                    0
     Mail::Address:                 0
@@ -20,7 +21,7 @@
     Test::More:                    0.47
     Time::Zone:                    0
     URI:                           1.23
-    User::Identity:                0.07
+    User::Identity:                0.9
 
 distribution_type: module
 generated_by: ExtUtils::MakeMaker version 6.17

Modified: packages/libmail-box-perl/trunk/Makefile.PL
===================================================================
--- packages/libmail-box-perl/trunk/Makefile.PL	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/Makefile.PL	2005-03-30 18:00:59 UTC (rev 842)
@@ -29,7 +29,7 @@
 
 my @optional =
 ( 
-  [ Mail::Box::Parser::C => '3.001'
+  [ Mail::Box::Parser::C => '3.006'
   , reason => <<'REASON', warning => <<'WARN' ]
 Speeds-up reading mail folders, though most time is consumed by
 Perl's administration of the processed data.
@@ -81,6 +81,11 @@
      if you want smart html conversions.
 REASON
 
+, [ Time::HiRes => '1.51', reason => <<'REASON' ]
+     When installed, unique message-ids will be created using gettimeofday.
+     Otherwise, generated message-ids will not be thread/fork safe.
+REASON
+
 , [ HTML::FormatText => '2.01', distr => 'HTML::Format', reason => <<'REASON' ]
 Plug-in which converts HTML to Postscript or plain text.
 REASON
@@ -89,6 +94,7 @@
 my %prereq =
  ( Date::Parse    => 0.0
  , File::Spec     => 0.7
+ , File::Remove   => 0.20
  , Errno          => 0.0
  , Scalar::Util   => 1.13
  , Object::Realize::Later => 0.14
@@ -101,7 +107,7 @@
  , URI            => 1.23
  , IO::Scalar     => 0.0
  , Digest::HMAC_MD5 => 0.0
- , User::Identity => 0.07
+ , User::Identity => 0.90
  , Time::Zone     => 0.0
  );
 
@@ -111,32 +117,6 @@
     $has_readkey = not length $@;
 }
 
-sub ask($$)
-{   my ($text, $default) = @_;
-    print "---> $text [$default] ";
-    my $key;
-
-    if(! -t STDIN) { $key = $default }
-    elsif($has_readkey)
-    {   Term::ReadKey->import;
-        ReadMode(3);   # cbreak mode
-        $key = ReadKey(0) until defined($key);
-        ReadMode(1);
-
-        $key = $default if $key =~ m/\n/;
-        print "$key\n";
-    }
-    else
-    {   # No Term::ReadKey
-        flush STDOUT;
-        my $line = <STDIN>;
-        $line    =~ m/(\S)/;
-        $key     = $1 || $default;
-    }
-
-    $key;
-}
-
 my $default_install_answer = $ENV{INSTALL_MAILBOX_OPTIONALS}
     || (-t STDIN ? 'y' : 'n');
 
@@ -229,7 +209,7 @@
     }
     
     my $install  = $default_install_answer;
-    my $key = ask "Do you want to install $module? yes/no/all", $install;
+    my $key = prompt "Do you want to install $module? yes/no/all", $install;
 
     if($key eq 'a')
     {   $default_install_answer = 'a';
@@ -248,8 +228,9 @@
 }
 
 # Debian: build should be non-interactive, we always run the tests
-#my $tests = ask "Do you want to run the (large set of) tests? yes/no", "yes";
+#my $tests = prompt "Do you want to run the (large set of) tests? yes/no", "yes";
 my $tests = "yes";
+
 if($tests =~ m/n/i)
 {   open F, ">", "skiptests";
     close F;

Modified: packages/libmail-box-perl/trunk/TODO.v2
===================================================================
--- packages/libmail-box-perl/trunk/TODO.v2	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/TODO.v2	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,13 +1,23 @@
 
 This file lists the things to do
 
-Obligatory:
+Question marks:
 
+  what if appendMessage fails
+
+  flock() stacked on flock() by same process on AIX and Solaris
+
+Optional:
+
+  References/mozilla-flags
+
+  filehandle as folder source
+
+  no read for MH index in append mode niet lezen.
+
   Processing folders with non-platform-native line separators.
   appendMessage opens folder, but not needed.
 
-Optional:
-
   fix_header_errors option for Mail::Box::Parser::C
 
   Body::* _data_from_*() may use $. in some cases.  This would speed-up

Modified: packages/libmail-box-perl/trunk/debian/changelog
===================================================================
--- packages/libmail-box-perl/trunk/debian/changelog	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/debian/changelog	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,3 +1,13 @@
+libmail-box-perl (2.060-1) unstable; urgency=low
+
+  * New upstream release (Closes: #293074)
+  * New maintainer - Debian Perl Group <pkg-perl-
+    maintainer at lists.alioth.debian.org> via Gunnar Wolf
+    <gwolf at debian.org> - Thanks, Jeroen van Wolffelaar, for
+    remembering me about it :-/ (Closes: #282298)
+
+ -- Gunnar Wolf <gwolf at debian.org>  Wed, 30 Mar 2005 11:45:31 -0600
+
 libmail-box-perl (2.055-1) unstable; urgency=low
 
   * New upstream release

Copied: packages/libmail-box-perl/trunk/lib/Mail/Box/Collection.pm (from rev 840, packages/libmail-box-perl/branches/upstream/current/lib/Mail/Box/Collection.pm)

Copied: packages/libmail-box-perl/trunk/lib/Mail/Box/Collection.pod (from rev 840, packages/libmail-box-perl/branches/upstream/current/lib/Mail/Box/Collection.pod)

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx/Message.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx/Message.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx/Message.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Box::Dbx::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::File::Message';
 
 use Carp;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx/Message.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx/Message.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx/Message.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -30,7 +30,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -38,14 +38,6 @@
 
 =back
 
-Mail::Box::Dbx::Message-E<gt>B<coerce>(MESSAGE)
-
-=over 4
-
-See L<Mail::Box::Message/"METHODS">
-
-=back
-
 Mail::Box::Dbx::Message-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -144,7 +136,7 @@
 
 =back
 
-Mail::Box::Dbx::Message-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Box::Dbx::Message-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -266,22 +258,54 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<copyTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
+$obj-E<gt>B<dbxRecord>
+
+=over 4
+
+Returns the Mail::Transport::Dbx::Email record of the message.
+
+=back
+
+$obj-E<gt>B<folder>([FOLDER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
+$obj-E<gt>B<fromLine>([LINE])
+
+=over 4
+
+See L<Mail::Box::File::Message/"The message">
+
+=back
+
 $obj-E<gt>B<isDummy>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -289,7 +313,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -297,15 +321,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<moveTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<print>([FILEHANDLE])
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -313,15 +345,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<seqnr>([INTEGER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<size>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -329,7 +369,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -601,7 +641,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -617,60 +657,25 @@
 
 =back
 
-=head2 The message
+=head2 Internals
 
 
-$obj-E<gt>B<copyTo>(FOLDER)
+$obj-E<gt>B<clonedFrom>
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<dbxRecord>
+Mail::Box::Dbx::Message-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
-Returns the Mail::Transport::Dbx::Email record of the message.
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<folder>([FOLDER])
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-$obj-E<gt>B<fromLine>([LINE])
-
-=over 4
-
-See L<Mail::Box::File::Message/"The message">
-
-=back
-
-$obj-E<gt>B<moveTo>(FOLDER)
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-$obj-E<gt>B<seqnr>([INTEGER])
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-=head2 Internals
-
-
 $obj-E<gt>B<diskDelete>
 
 =over 4
@@ -778,9 +783,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Dbx::Message-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Dbx::Message-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -955,10 +960,18 @@
 
 I<Error:> No default mailer found to send message.
 
-The message L<send()|Mail::Message/"The Message"> mechanism had not enough information to automatically
+The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
 find a mail transfer agent to sent this message.  Specify a mailer
 explicitly using the C<via> options.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message/"Internals">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -970,6 +983,14 @@
 I<Error:> Unable to read delayed body.
 
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -993,7 +1014,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -2,7 +2,7 @@
 use strict;
 package Mail::Box::Dbx;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::File';
 
 use Mail::Box::Dbx::Message;
@@ -94,10 +94,11 @@
 
 #-------------------------------------------
 
-sub nameOfSubFolder($)
-{   my ($self, $name) = (shift, shift);
-    my $dirname = dirname $self->filename;
-    File::Spec->catfile($dirname, "$name.dbx");
+sub nameOfSubFolder($;$)
+{   my $thing  = shift;
+    my $name   = (shift). '.dbx';
+    my $parent = @_ ? shift : ref $thing ? $thing->filename : undef;
+    defined $parent ?  File::Spec->catfile(dirname($parent), $name) : $name;
 }
 
 #-------------------------------------------

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Dbx.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -27,8 +27,8 @@
 
 These dbx folders are accessed using Mail::Transport::Dbx which
 is distributed via CPAN as separate package.  This C<MAil::Transport::Dbx>
-module is based on the open source library named C<libdbx>, which can
-be found at L<http://sourceforge.net/project/ol2mbox/>.  The library does
+module is based on the open source library named C<libpst>, which can
+be found at L<http://alioth.debian.org/projects/libpst/>.  The library does
 not support writing of dbx files, and therefore limits the possibilities
 of this package.
 
@@ -67,21 +67,6 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<create>(FOLDERNAME, OPTIONS)
-
-Mail::Box::Dbx-E<gt>B<create>(FOLDERNAME, OPTIONS)
-
-=over 4
-
-Creation is not supported for dbx folders.
-
- Option     Defined in    Default
- folderdir  L<Mail::Box>  undef  
-
-. folderdir DIRECTORY
-
-=back
-
 Mail::Box::Dbx-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -177,7 +162,7 @@
 =head2 The folder
 
 
-$obj-E<gt>B<addMessage>(MESSAGE)
+$obj-E<gt>B<addMessage>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -217,7 +202,7 @@
 
 =back
 
-$obj-E<gt>B<delete>
+$obj-E<gt>B<delete>(OPTIONS)
 
 =over 4
 
@@ -241,24 +226,6 @@
 
 =back
 
-Mail::Box::Dbx-E<gt>B<foundIn>([FOLDERNAME], [OPTIONS])
-
-=over 4
-
-If no FOLDERNAME is specified, then the value of the C<folder> option
-is taken.  A dbx folder is a file which name ends on C<.dbx> (case
-insensitive).
-
- Option     Defined in       Default
- folder                      undef  
- folderdir  L<Mail::Box>     undef  
-
-. folder FOLDERNAME
-
-. folderdir DIRECTORY
-
-=back
-
 $obj-E<gt>B<name>
 
 =over 4
@@ -310,6 +277,14 @@
 =head2 Folder flags
 
 
+$obj-E<gt>B<access>
+
+=over 4
+
+See L<Mail::Box/"Folder flags">
+
+=back
+
 $obj-E<gt>B<isModified>
 
 =over 4
@@ -393,6 +368,14 @@
 
 =back
 
+$obj-E<gt>B<nrMessages>(OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"The messages">
+
+=back
+
 $obj-E<gt>B<scanForMessages>(MESSAGE, MESSAGE-IDS, TIMESPAN, WINDOW)
 
 =over 4
@@ -414,11 +397,11 @@
 large amounts of folder names which do not really exist.  However, checking
 does consume some time.
 
- Option      Defined in       Default      
- check       L<Mail::Box>     <false>      
- folder      L<Mail::Box>     <required>   
- folderdir   L<Mail::Box>     <from folder>
- skip_empty  L<Mail::Box>     <false>      
+ Option      Defined in       Default              
+ check       L<Mail::Box>     <false>              
+ folder      L<Mail::Box>     <from calling object>
+ folderdir   L<Mail::Box>     <from folder>        
+ skip_empty  L<Mail::Box>     <false>              
 
 . check BOOLEAN
 
@@ -430,8 +413,10 @@
 
 =back
 
-$obj-E<gt>B<nameOfSubFolder>(NAME)
+$obj-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
 
+Mail::Box::Dbx-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
+
 =over 4
 
 See L<Mail::Box/"Sub-folders">
@@ -446,7 +431,7 @@
 
 =back
 
-$obj-E<gt>B<openSubFolder>(NAME, OPTIONS)
+$obj-E<gt>B<openSubFolder>(SUBNAME, OPTIONS)
 
 =over 4
 
@@ -454,10 +439,20 @@
 
 =back
 
+$obj-E<gt>B<topFolderWithMessages>
+
+Mail::Box::Dbx-E<gt>B<topFolderWithMessages>
+
+=over 4
+
+See L<Mail::Box/"Sub-folders">
+
+=back
+
 =head2 Internals
 
 
-$obj-E<gt>B<coerce>(MESSAGE)
+$obj-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -465,6 +460,21 @@
 
 =back
 
+$obj-E<gt>B<create>(FOLDERNAME, OPTIONS)
+
+Mail::Box::Dbx-E<gt>B<create>(FOLDERNAME, OPTIONS)
+
+=over 4
+
+Creation is not supported for dbx folders.
+
+ Option     Defined in    Default
+ folderdir  L<Mail::Box>  undef  
+
+. folderdir DIRECTORY
+
+=back
+
 $obj-E<gt>B<determineBodyType>(MESSAGE, HEAD)
 
 =over 4
@@ -484,6 +494,24 @@
 
 =back
 
+Mail::Box::Dbx-E<gt>B<foundIn>([FOLDERNAME], [OPTIONS])
+
+=over 4
+
+If no FOLDERNAME is specified, then the value of the C<folder> option
+is taken.  A dbx folder is a file which name ends on C<.dbx> (case
+insensitive).
+
+ Option     Defined in       Default
+ folder                      undef  
+ folderdir  L<Mail::Box>     undef  
+
+. folder FOLDERNAME
+
+. folderdir DIRECTORY
+
+=back
+
 $obj-E<gt>B<lineSeparator>([STRING|'CR'|'LF'|'CRLF'])
 
 =over 4
@@ -626,9 +654,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Dbx-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Dbx-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -897,7 +925,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Dir/Message.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Dir/Message.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Dir/Message.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,11 +4,11 @@
 
 package Mail::Box::Dir::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Message';
 
-use Carp;
 use File::Copy qw/move/;
+use IO::File;
 
 
 sub init($)
@@ -58,7 +58,7 @@
 
 sub filename(;$)
 {   my $self = shift;
-    @_ ? $self->{MBDM_filename} = shift : $self->{MBDM_filename};
+    @_ ? ($self->{MBDM_filename} = shift) : $self->{MBDM_filename};
 }
 
 #-------------------------------------------
@@ -204,6 +204,9 @@
          unless move($new, $filename);
 
     $self->modified(0);
+
+    # Do not affect flags for Maildir (and some other) which keep it
+    # in there.  Flags will be processed later.
     $self->Mail::Box::Dir::Message::filename($filename);
 
     $self;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Dir/Message.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Dir/Message.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Dir/Message.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -29,18 +29,27 @@
 There are no objects of type C<Mail::Box::Dir::Message>, only extensions
 are allowed to be created.
 
-At the moment, two of these extended message types are implemented:
+At the moment, three of these extended message types are implemented:
 
 =over 4
 
 =item * L<Mail::Box::MH::Message|Mail::Box::MH::Message>
 
-which represents one message in a L<Mail::Box::MH|Mail::Box::MH> folder.
+which represents one message in a L<Mail::Box::MH|Mail::Box::MH> folder.  MH folders are
+very, very simple.... and hence not sophisticated nor fast.
 
 =item * L<Mail::Box::Maildir::Message|Mail::Box::Maildir::Message>
 
-which represents one message in a L<Mail::Box::Maildir|Mail::Box::Maildir> folder.
+which represents one message in a L<Mail::Box::Maildir|Mail::Box::Maildir> folder.  Flags are
+kept in the message's filename.  It is stateless, so you will never loose
+a message.
 
+=item * Mail::Box::Netzwert::Message
+
+which represents one message in a Mail::Box::Netzwert folder.  As advantage,
+it stores pre-parsed information in the message file.  As disadvantage: the
+code is not GPLed (yet).
+
 =back
 
 
@@ -51,7 +60,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -59,14 +68,6 @@
 
 =back
 
-Mail::Box::Dir::Message-E<gt>B<coerce>(MESSAGE)
-
-=over 4
-
-See L<Mail::Box::Message/"METHODS">
-
-=back
-
 Mail::Box::Dir::Message-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -148,7 +149,7 @@
 
 =back
 
-Mail::Box::Dir::Message-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Box::Dir::Message-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -270,22 +271,47 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<copyTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
+$obj-E<gt>B<filename>([FILENAME])
+
+=over 4
+
+Returns the name of the file in which this message is actually stored.  This
+will return C<undef> when the message is not stored in a file.
+
+=back
+
+$obj-E<gt>B<folder>([FOLDER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<isDummy>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -293,7 +319,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -301,15 +327,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<moveTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<print>([FILEHANDLE])
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -317,15 +351,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<seqnr>([INTEGER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<size>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -333,7 +375,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -341,7 +383,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -605,7 +647,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -621,53 +663,25 @@
 
 =back
 
-=head2 The message
+=head2 Internals
 
 
-$obj-E<gt>B<copyTo>(FOLDER)
+$obj-E<gt>B<clonedFrom>
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<filename>([FILENAME])
+Mail::Box::Dir::Message-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
-Returns the name of the file in which this message is actually stored.  This
-will return C<undef> when the message is not stored in a file.
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<folder>([FOLDER])
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-$obj-E<gt>B<moveTo>(FOLDER)
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-$obj-E<gt>B<seqnr>([INTEGER])
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-=head2 Internals
-
-
 $obj-E<gt>B<create>(FILENAME)
 
 =over 4
@@ -789,9 +803,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Dir::Message-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Dir::Message-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -957,10 +971,18 @@
 
 I<Error:> No default mailer found to send message.
 
-The message L<send()|Mail::Message/"The Message"> mechanism had not enough information to automatically
+The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
 find a mail transfer agent to sent this message.  Specify a mailer
 explicitly using the C<via> options.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message/"Internals">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -983,6 +1005,14 @@
 a message is used for the first time here, but has disappeared or is
 unreadible for some other reason.
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -1006,7 +1036,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Dir.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Dir.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Dir.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -2,7 +2,7 @@
 use strict;
 package Mail::Box::Dir;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 use base 'Mail::Box';
 
@@ -32,12 +32,12 @@
 
     my $class            = ref $self;
     my $directory        = $self->{MBD_directory}
-       = $class->folderToDirectory($self->name, $self->folderdir);
+        = $args->{directory} || $self->directory;
 
        if(-d $directory) {;}
     elsif($args->{create} && $class->create($directory, %$args)) {;}
     else
-    {   $self->log(PROGRESS => "$class: No directory $directory.\n");
+    {   $self->log(NOTICE => "No directory $directory for folder of $class");
         return undef;
     }
 
@@ -54,7 +54,7 @@
     # Check if we can write to the folder, if we need to.
 
     if($self->writable && -e $directory && ! -w $directory)
-    {   $self->log(WARNING => "Folder directory $directory is write-protected.\n");
+    {   $self->log(WARNING=> "Folder directory $directory is write-protected.");
         $self->{MB_access} = 'r';
     }
 
@@ -68,14 +68,29 @@
 #-------------------------------------------
 
 
-sub directory() { shift->{MBD_directory} }
+sub directory()
+{   my $self = shift;
 
+    $self->{MBD_directory}
+       ||= $self->folderToDirectory($self->name, $self->folderdir);
+}
+
 #-------------------------------------------
 
+sub nameOfSubFolder($;$)
+{   my ($thing, $name) = (shift, shift);
+    my $parent = @_ ? shift : ref $thing ? $thing->directory : undef;
+    defined $parent ? "$parent/$name" : $name;
+}
 
+#-------------------------------------------
+
+
 sub folderToDirectory($$)
 {   my ($class, $name, $folderdir) = @_;
-    $name =~ /^=(.*)/ ? File::Spec->catfile($folderdir,$1) : $name;
+    my $dir = ( $name =~ m#^=\/?(.*)# ? "$folderdir/$1" : $name);
+    $dir =~ s!/$!!;
+    $dir;
 }
 
 #-------------------------------------------

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Dir.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Dir.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Dir.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -39,6 +39,12 @@
 files with names which are a combination of a numeric timestamp and some
 status flags.
 
+=item * Mail::Box::Netzwert
+
+This folder type was especially developed for Netzwert AG, optimized to
+run on a cluster of servers with folders on NFS.  The code is not publicly
+available (yet).
+
 =back
 
 
@@ -76,16 +82,6 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<create>(FOLDERNAME, OPTIONS)
-
-Mail::Box::Dir-E<gt>B<create>(FOLDERNAME, OPTIONS)
-
-=over 4
-
-See L<Mail::Box/"Constructors">
-
-=back
-
 Mail::Box::Dir-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -96,6 +92,7 @@
  body_type          L<Mail::Box>     L<Mail::Message::Body::Lines|Mail::Message::Body::Lines>        
  coerce_options     L<Mail::Box>     C<[]>                                                           
  create             L<Mail::Box>     <false>                                                         
+ directory                           <derived from folder name>                                      
  extract            L<Mail::Box>     C<10240>                                                        
  field_type         L<Mail::Box>     undef                                                           
  fix_headers        L<Mail::Box>     <false>                                                         
@@ -128,6 +125,15 @@
 
 . create BOOLEAN
 
+. directory DIRECTORY
+
+=over 4
+
+For rare folder types, the directory name may differ from the folder
+name.
+
+=back
+
 . extract INTEGER | CODE | METHOD | 'LAZY'|'ALWAYS'
 
 . field_type CLASS
@@ -175,7 +181,7 @@
 =head2 The folder
 
 
-$obj-E<gt>B<addMessage>(MESSAGE)
+$obj-E<gt>B<addMessage>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -215,7 +221,7 @@
 
 =back
 
-$obj-E<gt>B<delete>
+$obj-E<gt>B<delete>(OPTIONS)
 
 =over 4
 
@@ -243,14 +249,6 @@
 
 =back
 
-Mail::Box::Dir-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
-
-=over 4
-
-See L<Mail::Box/"The folder">
-
-=back
-
 $obj-E<gt>B<name>
 
 =over 4
@@ -302,6 +300,14 @@
 =head2 Folder flags
 
 
+$obj-E<gt>B<access>
+
+=over 4
+
+See L<Mail::Box/"Folder flags">
+
+=back
+
 $obj-E<gt>B<isModified>
 
 =over 4
@@ -385,6 +391,14 @@
 
 =back
 
+$obj-E<gt>B<nrMessages>(OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"The messages">
+
+=back
+
 $obj-E<gt>B<scanForMessages>(MESSAGE, MESSAGE-IDS, TIMESPAN, WINDOW)
 
 =over 4
@@ -406,8 +420,10 @@
 
 =back
 
-$obj-E<gt>B<nameOfSubFolder>(NAME)
+$obj-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
 
+Mail::Box::Dir-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
+
 =over 4
 
 See L<Mail::Box/"Sub-folders">
@@ -422,7 +438,7 @@
 
 =back
 
-$obj-E<gt>B<openSubFolder>(NAME, OPTIONS)
+$obj-E<gt>B<openSubFolder>(SUBNAME, OPTIONS)
 
 =over 4
 
@@ -430,10 +446,20 @@
 
 =back
 
+$obj-E<gt>B<topFolderWithMessages>
+
+Mail::Box::Dir-E<gt>B<topFolderWithMessages>
+
+=over 4
+
+See L<Mail::Box/"Sub-folders">
+
+=back
+
 =head2 Internals
 
 
-$obj-E<gt>B<coerce>(MESSAGE)
+$obj-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -441,6 +467,16 @@
 
 =back
 
+$obj-E<gt>B<create>(FOLDERNAME, OPTIONS)
+
+Mail::Box::Dir-E<gt>B<create>(FOLDERNAME, OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"Internals">
+
+=back
+
 $obj-E<gt>B<determineBodyType>(MESSAGE, HEAD)
 
 =over 4
@@ -458,6 +494,14 @@
 
 =back
 
+Mail::Box::Dir-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"Internals">
+
+=back
+
 $obj-E<gt>B<lineSeparator>([STRING|'CR'|'LF'|'CRLF'])
 
 =over 4
@@ -580,9 +624,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Dir-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Dir-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -744,6 +788,9 @@
 of two messages with the same id.  The warning emerges when the C<@> is
 missing from the string.
 
+I<Warning:> No directory $name for folder of $class
+
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -777,7 +824,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/FastScalar.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/FastScalar.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/FastScalar.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,6 +1,6 @@
 package Mail::Box::FastScalar;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 
 use strict;
@@ -9,7 +9,8 @@
 
 sub new($) {
     my ($class, $ref) = @_;
-    my $self = { ref => $ref, data => defined($$ref) ? $$ref : '' };
+    $$ref = '' unless defined($$ref);
+    my $self = { ref => $ref, pos => 0 };
 
     bless $self, $class;
     return $self;
@@ -30,82 +31,78 @@
 sub open($) {
     my $self = $_[0];
 
+    ${$_[1]} = '' unless defined(${$_[1]});
     $self->{ref} = $_[1];
-    $self->{data} = ${$self->{ref}};
+    $self->{pos} = 0;
 }
 
 sub close() {
-    my $self = $_[0];
-
-    $self->{data} = '';
-    undef $self->{ref};
+    undef $_[0]->{ref};
 }
 
 sub eof() {
     my $self = $_[0];
 
-    return length($self->{data}) == 0;
+    return $self->{pos} >= length(${$self->{ref}});
 }
 
 sub getc() {
     my $self = $_[0];
 
-    return substr($self->{data}, 0, 1, '');
+    return substr(${$self->{ref}}, $self->{pos}++, 1);
 }
 
 sub print {
-    my $self = shift();
-    my $buf = $#_ ? join('', @_) : $_[0];
+    my $self = shift;
+    my $pos = $self->{pos};
     my $ref = $self->{ref};
-    my $len = length($self->{data});
-
-    if ($len == 0) {
-	$$ref .= $buf;
+    my $len = length($$ref);
+    
+    if ($pos >= $len) {
+	$$ref .= $_ foreach @_;
+	$self->{pos} = length($$ref);
     } else {
-	my $pos = length($$ref) - $len;
-
+	my $buf = $#_ ? join('', @_) : $_[0];
+	
 	$len = length($buf);
 	substr($$ref, $pos, $len) = $buf;
-	$self->{data} = substr($$ref, $pos + $len, -1);
+	$self->{pos} = $pos + $len;
     }
-    return 1;
+    1;
 }
 
 sub read($$;$) {
     my $self = $_[0];
-    my $buf = substr($self->{data}, 0, $_[2], '');
+    my $buf = substr(${$self->{ref}}, $self->{pos}, $_[2]);
+    $self->{pos} += $_[2];
 
     ($_[3] ? substr($_[1], $_[3]) : $_[1]) = $buf;
     return length($buf);
 }
 
 sub sysread($$;$) {
-    return shift->read(@_);
+    return shift()->read(@_);
 }
 
 sub seek($$) {
     my $self = $_[0];
     my $whence = $_[2];
-    my $ref = $self->{ref};
-    my $len = length($$ref);
-    my $pos;
+    my $len = length(${$self->{ref}});
 
     if ($whence == 0) {
-	$pos = $_[1];
+	$self->{pos} = $_[1];
     } elsif ($whence == 1) {
-	$pos = $len - length($self->{data}) + $_[1];
+	$self->{pos} += $_[1];
     } elsif ($whence == 2) {
-	$pos = $len - length($self->{data}) - $_[1];
+	$self->{pos} = $len + $_[1];
     } else {
 	return;
     }
-
-    if ($pos > $len) {
-	$pos = $len;
-    } elsif ($pos < 0) {
-	$pos = 0;
+    if ($self->{pos} > $len) {
+	$self->{pos} = $len;
+    } elsif ($self->{pos} < 0) {
+	$self->{pos} = 0;
     }
-    $self->{data} = substr($$ref, $pos);
     return 1;
 }
 
@@ -122,31 +119,29 @@
 }
 
 sub getpos() {
-    my $self = $_[0];
-
-    return length(${$self->{ref}}) - length($self->{data});
+    return $_[0]->{pos};
 }
 
 sub tell() {
-    my $self = $_[0];
-
-    return length(${$self->{ref}}) - length($self->{data});
+    return $_[0]->{pos};
 }
 
 sub write($$;$) {
     my $self = $_[0];
-    my $buf = substr($_[1], $_[3] || 0, $_[2]);
+    my $pos = $self->{pos};
     my $ref = $self->{ref};
-    my $len = length($self->{data});
+    my $len = length($$ref);
 
-    if ($len == 0) {
-	$$ref .= $buf;
+    if ($pos >= $len) {
+	$$ref .= substr($_[1], $_[3] || 0, $_[2]);
+	$self->{pos} = length($$ref);
+	$len = $self->{pos} -  $len;
     } else {
-	my $pos = length($$ref) - $len;
-
+	my $buf = substr($_[1], $_[3] || 0, $_[2]);
+	
 	$len = length($buf);
 	substr($$ref, $pos, $len) = $buf;
-	$self->{data} = substr($$ref, $pos + $len, -1, '');
+	$self->{pos} = $pos + $len;
     }
     return $len;
 }
@@ -157,33 +152,37 @@
 
 sub getline() {
     my $self = $_[0];
-    my $data = \$self->{data};
+    my $ref = $self->{ref};
+    my $pos = $self->{pos};
 
-    if ((my $idx = index($$data, $/)) == -1 || !defined($/)) {
-	my $r = $$data;
-
-	return unless (length($r) > 0);
-	$$data = '';
-	return $r;
+    if (!defined($/) || (my $idx = index($$ref, $/, $pos)) == -1) {
+	return if ($pos >= length($$ref));
+	$self->{pos} = length($$ref);
+	return substr($$ref, $pos);
     } else {
-	return substr($$data, 0, $idx + 1, '');
+	return substr($$ref, $pos, ($self->{pos} = $idx + length($/)) - $pos);
     }
 }
 
 sub getlines() {
     my $self = $_[0];
-    my $data = $self->{data};
     my @lines;
+    my $ref = $self->{ref};
+    my $pos = $self->{pos};
 
-    $self->{data} = '';
     if (defined($/)) {
 	my $idx;
-
-	while (($idx = index($data, $/)) != -1) {
-	    push(@lines, substr($data, 0, $idx + 1, ''));
+	
+	while (($idx = index($$ref, $/, $pos)) != -1) {
+	    push(@lines, substr($$ref, $pos, ($idx + 1) - $pos));
+	    $pos = $idx + 1;
 	}
     }
-    push(@lines, $data) if (length($data) > 0);
+    my $r = substr($$ref, $pos);
+    if (length($r) > 0) {
+	push(@lines, $r);
+    }
+    $self->{pos} = length($$ref);
     return wantarray() ? @lines : \@lines;
 }
 
@@ -204,3 +203,5 @@
 sub EOF { shift()->eof(@_); }
 
 1;
+
+1;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/FastScalar.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/FastScalar.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/FastScalar.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -37,7 +37,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/File/Message.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/File/Message.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/File/Message.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -2,7 +2,7 @@
 use strict;
 package Mail::Box::File::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Message';
 
 use POSIX 'SEEK_SET';

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/File/Message.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/File/Message.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/File/Message.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -35,7 +35,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -43,14 +43,6 @@
 
 =back
 
-Mail::Box::File::Message-E<gt>B<coerce>(MESSAGE)
-
-=over 4
-
-See L<Mail::Box::Message/"METHODS">
-
-=back
-
 Mail::Box::File::Message-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -124,7 +116,7 @@
 
 =back
 
-Mail::Box::File::Message-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Box::File::Message-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -246,22 +238,52 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<copyTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
+$obj-E<gt>B<folder>([FOLDER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
+$obj-E<gt>B<fromLine>([LINE])
+
+=over 4
+
+Many people detest file-style folders because they store messages all in
+one file, where a line starting with C<From > leads the header.  If we
+receive a message from a file-based folder, we store that line.  If we write
+to such a file, but there is no such line stored, then we try to generate
+one.
+
+If LINE is provided, then the starting line is set to this value.
+
+=back
+
 $obj-E<gt>B<isDummy>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -269,7 +291,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -277,15 +299,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<moveTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<print>([FILEHANDLE])
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -293,15 +323,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<seqnr>([INTEGER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<size>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -309,7 +347,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -589,7 +627,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -605,58 +643,25 @@
 
 =back
 
-=head2 The message
+=head2 Internals
 
 
-$obj-E<gt>B<copyTo>(FOLDER)
+$obj-E<gt>B<clonedFrom>
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<folder>([FOLDER])
+Mail::Box::File::Message-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<fromLine>([LINE])
-
-=over 4
-
-Many people detest file-style folders because they store messages all in
-one file, where a line starting with C<From > leads the header.  If we
-receive a message from a file-based folder, we store that line.  If we write
-to such a file, but there is no such line stored, then we try to generate
-one.
-
-If LINE is provided, then the starting line is set to this value.
-
-=back
-
-$obj-E<gt>B<moveTo>(FOLDER)
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-$obj-E<gt>B<seqnr>([INTEGER])
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-=head2 Internals
-
-
 $obj-E<gt>B<diskDelete>
 
 =over 4
@@ -767,9 +772,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::File::Message-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::File::Message-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -918,10 +923,18 @@
 
 I<Error:> No default mailer found to send message.
 
-The message L<send()|Mail::Message/"The Message"> mechanism had not enough information to automatically
+The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
 find a mail transfer agent to sent this message.  Specify a mailer
 explicitly using the C<via> options.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message/"Internals">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -933,6 +946,14 @@
 I<Error:> Unable to read delayed body.
 
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -956,7 +977,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/File.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/File.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/File.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -2,7 +2,7 @@
 use strict;
 package Mail::Box::File;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box';
 
 use Mail::Box::File::Message;
@@ -123,7 +123,7 @@
         $create->close or return;
     }
     else
-    {   $class->log(WARNING => "Cannot create folder file $name: $!\n");
+    {   $class->log(WARNING => "Cannot create folder file $name: $!");
         return;
     }
 
@@ -310,14 +310,22 @@
 
 sub moveAwaySubFolder($$)
 {   my ($self, $dir, $extension) = @_;
-    $self->log("ERROR: Cannot move away sub-folder $dir")
+    $self->log(ERROR => "Cannot move away sub-folder $dir")
        unless move $dir, $dir.$extension;
     $self;
 }
 
 #-------------------------------------------
 
+sub delete(@)
+{   my $self = shift;
+    $self->SUPER::delete(@_);
+    unlink $self->filename;
+}
 
+#-------------------------------------------
+
+
 sub writeMessages($)
 {   my ($self, $args) = @_;
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/File.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/File.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/File.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -61,19 +61,6 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<create>(FOLDERNAME, OPTIONS)
-
-Mail::Box::File-E<gt>B<create>(FOLDERNAME, OPTIONS)
-
-=over 4
-
- Option     Defined in    Default
- folderdir  L<Mail::Box>  undef  
-
-. folderdir DIRECTORY
-
-=back
-
 Mail::Box::File-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -213,7 +200,7 @@
 =head2 The folder
 
 
-$obj-E<gt>B<addMessage>(MESSAGE)
+$obj-E<gt>B<addMessage>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -242,6 +229,7 @@
  folder    L<Mail::Box>     <required>
  message   L<Mail::Box>     undef     
  messages  L<Mail::Box>     undef     
+ share     L<Mail::Box>     <false>   
 
 . folder FOLDERNAME
 
@@ -249,6 +237,8 @@
 
 . messages ARRAY-OF-MESSAGES
 
+. share BOOLEAN
+
 =back
 
 $obj-E<gt>B<close>(OPTIONS)
@@ -267,7 +257,7 @@
 
 =back
 
-$obj-E<gt>B<delete>
+$obj-E<gt>B<delete>(OPTIONS)
 
 =over 4
 
@@ -296,14 +286,6 @@
 
 =back
 
-Mail::Box::File-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
-
-=over 4
-
-See L<Mail::Box/"The folder">
-
-=back
-
 $obj-E<gt>B<name>
 
 =over 4
@@ -355,6 +337,14 @@
 =head2 Folder flags
 
 
+$obj-E<gt>B<access>
+
+=over 4
+
+See L<Mail::Box/"Folder flags">
+
+=back
+
 $obj-E<gt>B<isModified>
 
 =over 4
@@ -438,6 +428,14 @@
 
 =back
 
+$obj-E<gt>B<nrMessages>(OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"The messages">
+
+=back
+
 $obj-E<gt>B<scanForMessages>(MESSAGE, MESSAGE-IDS, TIMESPAN, WINDOW)
 
 =over 4
@@ -459,8 +457,10 @@
 
 =back
 
-$obj-E<gt>B<nameOfSubFolder>(NAME)
+$obj-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
 
+Mail::Box::File-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
+
 =over 4
 
 See L<Mail::Box/"Sub-folders">
@@ -475,7 +475,7 @@
 
 =back
 
-$obj-E<gt>B<openSubFolder>(NAME, OPTIONS)
+$obj-E<gt>B<openSubFolder>(SUBNAME, OPTIONS)
 
 =over 4
 
@@ -483,10 +483,20 @@
 
 =back
 
+$obj-E<gt>B<topFolderWithMessages>
+
+Mail::Box::File-E<gt>B<topFolderWithMessages>
+
+=over 4
+
+See L<Mail::Box/"Sub-folders">
+
+=back
+
 =head2 Internals
 
 
-$obj-E<gt>B<coerce>(MESSAGE)
+$obj-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -494,6 +504,19 @@
 
 =back
 
+$obj-E<gt>B<create>(FOLDERNAME, OPTIONS)
+
+Mail::Box::File-E<gt>B<create>(FOLDERNAME, OPTIONS)
+
+=over 4
+
+ Option     Defined in    Default
+ folderdir  L<Mail::Box>  undef  
+
+. folderdir DIRECTORY
+
+=back
+
 $obj-E<gt>B<determineBodyType>(MESSAGE, HEAD)
 
 =over 4
@@ -514,6 +537,14 @@
 
 =back
 
+Mail::Box::File-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"Internals">
+
+=back
+
 $obj-E<gt>B<lineSeparator>([STRING|'CR'|'LF'|'CRLF'])
 
 =over 4
@@ -743,9 +774,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::File-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::File-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -991,7 +1022,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Head.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Head.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Head.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Box::IMAP4::Head;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Head';
 
 use Date::Parse;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Head.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Head.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Head.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -54,7 +54,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<build>(FIELDS)
+$obj-E<gt>B<build>([PAIR|FIELD]-LIST)
 
 =over 4
 
@@ -272,9 +272,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::IMAP4::Head-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::IMAP4::Head-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -403,7 +403,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Message.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Message.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Message.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Box::IMAP4::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Net::Message';
 
 use Date::Parse 'str2time';
@@ -59,12 +59,13 @@
 	return $labels->{$label}
 	   if exists $labels->{$label} || exists $labels->{seen};
 
-	my %flags = $imap->getFlags($id);
+	my $flags = $imap->getFlags($id);
         if($self->{MBIM_cache_labels})
-	{   @{$labels}{keys %flags} = values %flags;
+	{   # the program may have added own labels
+            @{$labels}{keys %$flags} = values %$flags;
             delete $self->{MBIM_labels_changed};
 	}
-	return $flags{$label};
+	return $flags->{$label};
     }
 
     my @private;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Message.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Message.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4/Message.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -34,7 +34,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -42,14 +42,6 @@
 
 =back
 
-Mail::Box::IMAP4::Message-E<gt>B<coerce>(MESSAGE)
-
-=over 4
-
-See L<Mail::Box::Message/"METHODS">
-
-=back
-
 Mail::Box::IMAP4::Message-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -144,7 +136,7 @@
 
 =back
 
-Mail::Box::IMAP4::Message-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Box::IMAP4::Message-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -266,22 +258,38 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<copyTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
+$obj-E<gt>B<folder>([FOLDER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<isDummy>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -289,7 +297,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -297,15 +305,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<moveTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<print>([FILEHANDLE])
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -313,10 +329,18 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<seqnr>([INTEGER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<size>
 
 =over 4
@@ -332,15 +356,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<unique>([STRING|undef])
+
+=over 4
+
+See L<Mail::Box::Net::Message/"The message">
+
+=back
+
 $obj-E<gt>B<write>([FILEHANDLE])
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -614,7 +646,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -630,52 +662,25 @@
 
 =back
 
-=head2 The message
+=head2 Internals
 
 
-$obj-E<gt>B<copyTo>(FOLDER)
+$obj-E<gt>B<clonedFrom>
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<folder>([FOLDER])
+Mail::Box::IMAP4::Message-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<moveTo>(FOLDER)
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-$obj-E<gt>B<seqnr>([INTEGER])
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-$obj-E<gt>B<unique>([STRING|undef])
-
-=over 4
-
-See L<Mail::Box::Net::Message/"The message">
-
-=back
-
-=head2 Internals
-
-
 $obj-E<gt>B<diskDelete>
 
 =over 4
@@ -797,9 +802,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::IMAP4::Message-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::IMAP4::Message-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -948,10 +953,18 @@
 
 I<Error:> No default mailer found to send message.
 
-The message L<send()|Mail::Message/"The Message"> mechanism had not enough information to automatically
+The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
 find a mail transfer agent to sent this message.  Specify a mailer
 explicitly using the C<via> options.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message/"Internals">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -966,6 +979,14 @@
 I<Error:> Unable to read delayed head.
 
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -1039,7 +1060,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Box::IMAP4;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Net';
 
 use Mail::Box::IMAP4::Message;
@@ -44,7 +44,7 @@
     my $transport = $args->{transporter} || 'Mail::Transport::IMAP4';
     unless(ref $transport)
     {   eval "require $transport";
-        $self->log(ERROR => "Cannot install transporter $transport:\n$@\n"),
+        $self->log(ERROR => "Cannot install transporter $transport:\n$@"),
            return () if $@;
 
         $transport = $self->createTransporter($transport, %$args)
@@ -103,10 +103,7 @@
 
 #-------------------------------------------
 
-sub nameOfSubfolder($)
-{   my ($self, $name) = @_;
-    $name;
-}
+sub nameOfSubfolder($;$) { $_[1] }
 
 #-------------------------------------------
 
@@ -247,7 +244,16 @@
 
 #-------------------------------------------
 
+sub delete(@)
+{   my $self   = shift;
+    my $transp = $self->transporter;
+    $self->SUPER::delete(@_);   # subfolders
+    $transp->deleteFolder($self->name);
+}
 
+#-------------------------------------------
+
+
 sub writeMessages($@)
 {   my ($self, $args) = @_;
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/IMAP4.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -20,24 +20,9 @@
 
 =head1 DESCRIPTION
 
-UNDER DEVELOPMENT!!!! LIMITATIONS:
-
-=over 4
-=item * this implementation is close to NOT TESTED!
-Of course, some testing has been done, but this is far from complete. Please
-contribute with ideas are problem reports.
-
-=item * messages are all treated as separte items
-
-Performance can be improved combining request for multiple subjects. For
-instance, a preloadFields() or a preloadEnvelope() would speed-up most
-
-applications
-=back
-
 Maintain a folder which has its messages stored on a remote server.  The
 communication between the client application and the server is implemented
-using the IMAP4 protocol.
+using the IMAP4 protocol.  See also L<Mail::Server::IMAP4|Mail::Server::IMAP4>.
 
 This class uses L<Mail::Transport::IMAP4|Mail::Transport::IMAP4> to hide the transport of
 information, and focusses solely on the correct handling of messages
@@ -79,16 +64,6 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<create>(FOLDER, OPTIONS)
-
-Mail::Box::IMAP4-E<gt>B<create>(FOLDER, OPTIONS)
-
-=over 4
-
-See L<Mail::Box::Net/"METHODS">
-
-=back
-
 Mail::Box::IMAP4-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -308,7 +283,7 @@
 =head2 The folder
 
 
-$obj-E<gt>B<addMessage>(MESSAGE)
+$obj-E<gt>B<addMessage>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -363,7 +338,7 @@
 
 =back
 
-$obj-E<gt>B<delete>
+$obj-E<gt>B<delete>(OPTIONS)
 
 =over 4
 
@@ -379,14 +354,6 @@
 
 =back
 
-Mail::Box::IMAP4-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
-
-=over 4
-
-See L<Mail::Box/"The folder">
-
-=back
-
 $obj-E<gt>B<name>
 
 =over 4
@@ -438,6 +405,14 @@
 =head2 Folder flags
 
 
+$obj-E<gt>B<access>
+
+=over 4
+
+See L<Mail::Box/"Folder flags">
+
+=back
+
 $obj-E<gt>B<isModified>
 
 =over 4
@@ -521,6 +496,14 @@
 
 =back
 
+$obj-E<gt>B<nrMessages>(OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"The messages">
+
+=back
+
 $obj-E<gt>B<scanForMessages>(MESSAGE, MESSAGE-IDS, TIMESPAN, WINDOW)
 
 =over 4
@@ -542,8 +525,10 @@
 
 =back
 
-$obj-E<gt>B<nameOfSubFolder>(NAME)
+$obj-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
 
+Mail::Box::IMAP4-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
+
 =over 4
 
 See L<Mail::Box/"Sub-folders">
@@ -558,7 +543,7 @@
 
 =back
 
-$obj-E<gt>B<openSubFolder>(NAME, OPTIONS)
+$obj-E<gt>B<openSubFolder>(SUBNAME, OPTIONS)
 
 =over 4
 
@@ -566,6 +551,16 @@
 
 =back
 
+$obj-E<gt>B<topFolderWithMessages>
+
+Mail::Box::IMAP4-E<gt>B<topFolderWithMessages>
+
+=over 4
+
+See L<Mail::Box/"Sub-folders">
+
+=back
+
 =head2 Internals
 
 
@@ -575,7 +570,7 @@
 
 =back
 
-$obj-E<gt>B<coerce>(MESSAGE)
+$obj-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -583,6 +578,16 @@
 
 =back
 
+$obj-E<gt>B<create>(FOLDER, OPTIONS)
+
+Mail::Box::IMAP4-E<gt>B<create>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Net/"METHODS">
+
+=back
+
 $obj-E<gt>B<createTransporter>(CLASS, OPTIONS)
 
 =over 4
@@ -634,6 +639,14 @@
 
 =back
 
+Mail::Box::IMAP4-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"Internals">
+
+=back
+
 $obj-E<gt>B<getHead>(MESSAGE)
 
 =over 4
@@ -800,9 +813,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::IMAP4-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::IMAP4-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -1002,7 +1015,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Copied: packages/libmail-box-perl/trunk/lib/Mail/Box/Identity.pm (from rev 840, packages/libmail-box-perl/branches/upstream/current/lib/Mail/Box/Identity.pm)

Copied: packages/libmail-box-perl/trunk/lib/Mail/Box/Identity.pod (from rev 840, packages/libmail-box-perl/branches/upstream/current/lib/Mail/Box/Identity.pod)

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/DotLock.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/DotLock.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/DotLock.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Box::Locker::DotLock;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Locker';
 
 use IO::File;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/DotLock.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/DotLock.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/DotLock.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -146,9 +146,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Locker::DotLock-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Locker::DotLock-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -274,7 +274,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Flock.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Flock.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Flock.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Box::Locker::Flock;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Locker';
 
 use IO::File;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Flock.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Flock.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Flock.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -140,9 +140,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Locker::Flock-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Locker::Flock-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -285,7 +285,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Multi.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Multi.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Multi.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Box::Locker::Multi;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Locker';
 
 use Carp;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Multi.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Multi.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/Multi.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -170,9 +170,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Locker::Multi-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Locker::Multi-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -298,7 +298,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/NFS.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/NFS.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/NFS.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Box::Locker::NFS;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Locker';
 
 use Sys::Hostname;
@@ -86,7 +86,7 @@
 
     if(-e $lockfile && -A $lockfile > $expires)
     {   if(unlink $lockfile)
-             { $self->log(WARNING => "Removed expired lockfile $lockfile.\n") }
+             { $self->log(WARNING => "Removed expired lockfile $lockfile.") }
         else { $self->log(ERROR =>
                         "Unable to remove expired lockfile $lockfile: $!") }
     }

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/NFS.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/NFS.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/NFS.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -141,9 +141,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Locker::NFS-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Locker::NFS-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -281,7 +281,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/POSIX.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/POSIX.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/POSIX.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Box::Locker::POSIX;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Locker';
 
 use POSIX;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/POSIX.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/POSIX.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Locker/POSIX.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -137,9 +137,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Locker::POSIX-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Locker::POSIX-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -282,7 +282,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Locker.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Locker.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Locker.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,11 +3,10 @@
 
 package Mail::Box::Locker;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use Carp;
-use File::Spec;
 use Scalar::Util 'weaken';
 
 #-------------------------------------------

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Locker.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Locker.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Locker.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -287,9 +287,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Locker-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Locker-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -416,7 +416,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Index.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Index.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Index.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Box::MH::Index;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use Mail::Message::Head::Subset;
@@ -87,11 +87,14 @@
     my %index;
 
     while(my $head = $type->new(@options)->read($parser))
-    {   my $msgfile = $head->get('x-mailbox-filename');
+    {
+        # cleanup the index from files which were renamed
+        my $msgfile = $head->get('x-mailbox-filename');
         my $size    = int $head->get('x-mailbox-size');
         next unless -f $msgfile && -s _ == $size;
         next if defined $index_age && -M _ >= $index_age;
 
+        # keep this one
         $index{$msgfile} = $head;
     }
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Index.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Index.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Index.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -149,9 +149,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::MH::Index-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::MH::Index-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -277,7 +277,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Labels.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Labels.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Labels.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Box::MH::Labels;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use Mail::Message::Head::Subset;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Labels.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Labels.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Labels.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -131,9 +131,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::MH::Labels-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::MH::Labels-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -259,7 +259,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Message.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Message.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Message.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,11 +4,19 @@
 
 package Mail::Box::MH::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Dir::Message';
 
 use File::Copy;
 use Carp;
 
 
+#-------------------------------------------
+
+
+# Purpose of doc is only the warning... no new implementation required.
+
+#-------------------------------------------
+
+
 1;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Message.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Message.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/MH/Message.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -33,7 +33,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -41,14 +41,6 @@
 
 =back
 
-Mail::Box::MH::Message-E<gt>B<coerce>(MESSAGE)
-
-=over 4
-
-See L<Mail::Box::Message/"METHODS">
-
-=back
-
 Mail::Box::MH::Message-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -68,7 +60,7 @@
 
 =back
 
-Mail::Box::MH::Message-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Box::MH::Message-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -190,22 +182,46 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<copyTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
+$obj-E<gt>B<filename>([FILENAME])
+
+=over 4
+
+See L<Mail::Box::Dir::Message/"The message">
+
+=back
+
+$obj-E<gt>B<folder>([FOLDER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<isDummy>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -213,7 +229,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -221,15 +237,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<moveTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<print>([FILEHANDLE])
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -237,15 +261,28 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<seqnr>([INTEGER])
+
+=over 4
+
+The order of this message in the folder, counted from zero.  Do not
+change the number (unless you understand the implications).
+
+WARNING:  This sequence number has nothing to do with the message's
+filename, which in case of MH folders are also numbers!  If you need
+that one, use the File::Basename subroutine basename of the filename.
+
+=back
+
 $obj-E<gt>B<size>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -253,7 +290,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -261,7 +298,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -525,7 +562,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -541,57 +578,25 @@
 
 =back
 
-=head2 The message
+=head2 Internals
 
 
-$obj-E<gt>B<copyTo>(FOLDER)
+$obj-E<gt>B<clonedFrom>
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<filename>([FILENAME])
+Mail::Box::MH::Message-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
-See L<Mail::Box::Dir::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<folder>([FOLDER])
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-$obj-E<gt>B<moveTo>(FOLDER)
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-$obj-E<gt>B<seqnr>([INTEGER])
-
-=over 4
-
-The order of this message in the folder, counted from zero.  Do not
-change the number (unless you understand the implications).
-
-WARNING:  This sequence number has nothing to do with the message's
-filename, which in case of MH folders are also numbers!  If you need
-that one, use the File::Basename subroutine basename of the filename.
-
-=back
-
-=head2 Internals
-
-
 $obj-E<gt>B<create>(FILENAME)
 
 =over 4
@@ -707,9 +712,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::MH::Message-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::MH::Message-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -875,10 +880,18 @@
 
 I<Error:> No default mailer found to send message.
 
-The message L<send()|Mail::Message/"The Message"> mechanism had not enough information to automatically
+The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
 find a mail transfer agent to sent this message.  Specify a mailer
 explicitly using the C<via> options.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message/"Internals">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -901,6 +914,14 @@
 a message is used for the first time here, but has disappeared or is
 unreadible for some other reason.
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -961,7 +982,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/MH.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/MH.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/MH.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -2,7 +2,7 @@
 use strict;
 package Mail::Box::MH;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Dir';
 
 use Mail::Box::MH::Index;
@@ -10,8 +10,9 @@
 use Mail::Box::MH::Labels;
 
 use Carp;
-use File::Spec;
-use File::Basename;
+use File::Spec       ();
+use File::Basename   'basename';
+use IO::Handle       ();
 
 # Since MailBox 2.052, the use of File::Spec is reduced to the minimum,
 # because it is too slow.  The '/' directory separators do work on
@@ -70,11 +71,11 @@
     return $class if -d $directory;
 
     if(mkdir $directory, 0700)
-    {   $class->log(PROGRESS => "Created folder $name.\n");
+    {   $class->log(PROGRESS => "Created folder $name.");
         return $class;
     }
     else
-    {   $class->log(ERROR => "Cannot create MH folder $name: $!\n");
+    {   $class->log(ERROR => "Cannot create MH folder $name: $!");
         return;
     }
 }
@@ -180,13 +181,6 @@
 
 #-------------------------------------------
 
-sub nameOfSubFolder($@)
-{   my ($self, $name) = (shift, shift);
-    $self->directory . '/' . $name;
-}
-
-#-------------------------------------------
-
 sub openSubFolder($)
 {   my ($self, $name) = @_;
 
@@ -201,7 +195,11 @@
 
 #-------------------------------------------
 
+sub topFolderWithMessages() { 1 }
 
+#-------------------------------------------
+
+
 sub appendMessages(@)
 {   my $class  = shift;
     my %args   = @_;
@@ -362,7 +360,24 @@
  
 #-------------------------------------------
 
+sub delete(@)
+{   my $self = shift;
+    $self->SUPER::delete(@_);
 
+    my $dir = $self->directory;
+    return 1 unless opendir DIR, $dir;
+    IO::Handle::untaint \*DIR;
+
+    # directories (subfolders) are not removed, as planned
+    unlink "$dir/$_" for readdir DIR;
+    closedir DIR;
+
+    rmdir $dir;    # fails when there are subdirs (without recurse)
+}
+
+#-------------------------------------------
+
+
 sub writeMessages($)
 {   my ($self, $args) = @_;
 
@@ -421,7 +436,5 @@
 
 #-------------------------------------------
 
-#-------------------------------------------
 
-
 1;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/MH.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/MH.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/MH.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -58,19 +58,6 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<create>(FOLDERNAME, OPTIONS)
-
-Mail::Box::MH-E<gt>B<create>(FOLDERNAME, OPTIONS)
-
-=over 4
-
- Option     Defined in    Default
- folderdir  L<Mail::Box>  undef  
-
-. folderdir DIRECTORY
-
-=back
-
 Mail::Box::MH-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -81,6 +68,7 @@
  body_type          L<Mail::Box>     L<Mail::Message::Body::Lines|Mail::Message::Body::Lines>        
  coerce_options     L<Mail::Box>     C<[]>                                                           
  create             L<Mail::Box>     <false>                                                         
+ directory          L<Mail::Box::Dir>  <derived from folder name>                                      
  extract            L<Mail::Box>     C<10240>                                                        
  field_type         L<Mail::Box>     undef                                                           
  fix_headers        L<Mail::Box>     <false>                                                         
@@ -120,6 +108,8 @@
 
 . create BOOLEAN
 
+. directory DIRECTORY
+
 . extract INTEGER | CODE | METHOD | 'LAZY'|'ALWAYS'
 
 . field_type CLASS
@@ -225,7 +215,7 @@
 =head2 The folder
 
 
-$obj-E<gt>B<addMessage>(MESSAGE)
+$obj-E<gt>B<addMessage>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -251,6 +241,7 @@
  folder    L<Mail::Box>     <required>
  message   L<Mail::Box>     undef     
  messages  L<Mail::Box>     undef     
+ share     L<Mail::Box>     <false>   
 
 . folder FOLDERNAME
 
@@ -258,6 +249,8 @@
 
 . messages ARRAY-OF-MESSAGES
 
+. share BOOLEAN
+
 =back
 
 $obj-E<gt>B<close>(OPTIONS)
@@ -276,7 +269,7 @@
 
 =back
 
-$obj-E<gt>B<delete>
+$obj-E<gt>B<delete>(OPTIONS)
 
 =over 4
 
@@ -300,14 +293,6 @@
 
 =back
 
-Mail::Box::MH-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
-
-=over 4
-
-See L<Mail::Box/"The folder">
-
-=back
-
 $obj-E<gt>B<name>
 
 =over 4
@@ -359,6 +344,14 @@
 =head2 Folder flags
 
 
+$obj-E<gt>B<access>
+
+=over 4
+
+See L<Mail::Box/"Folder flags">
+
+=back
+
 $obj-E<gt>B<isModified>
 
 =over 4
@@ -442,6 +435,14 @@
 
 =back
 
+$obj-E<gt>B<nrMessages>(OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"The messages">
+
+=back
+
 $obj-E<gt>B<scanForMessages>(MESSAGE, MESSAGE-IDS, TIMESPAN, WINDOW)
 
 =over 4
@@ -463,8 +464,10 @@
 
 =back
 
-$obj-E<gt>B<nameOfSubFolder>(NAME)
+$obj-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
 
+Mail::Box::MH-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
+
 =over 4
 
 See L<Mail::Box/"Sub-folders">
@@ -479,7 +482,7 @@
 
 =back
 
-$obj-E<gt>B<openSubFolder>(NAME, OPTIONS)
+$obj-E<gt>B<openSubFolder>(SUBNAME, OPTIONS)
 
 =over 4
 
@@ -487,10 +490,20 @@
 
 =back
 
+$obj-E<gt>B<topFolderWithMessages>
+
+Mail::Box::MH-E<gt>B<topFolderWithMessages>
+
+=over 4
+
+See L<Mail::Box/"Sub-folders">
+
+=back
+
 =head2 Internals
 
 
-$obj-E<gt>B<coerce>(MESSAGE)
+$obj-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -498,6 +511,19 @@
 
 =back
 
+$obj-E<gt>B<create>(FOLDERNAME, OPTIONS)
+
+Mail::Box::MH-E<gt>B<create>(FOLDERNAME, OPTIONS)
+
+=over 4
+
+ Option     Defined in    Default
+ folderdir  L<Mail::Box>  undef  
+
+. folderdir DIRECTORY
+
+=back
+
 $obj-E<gt>B<determineBodyType>(MESSAGE, HEAD)
 
 =over 4
@@ -514,6 +540,14 @@
 
 =back
 
+Mail::Box::MH-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"Internals">
+
+=back
+
 $obj-E<gt>B<highestMessageNumber>
 
 =over 4
@@ -674,9 +708,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::MH-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::MH-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -940,7 +974,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir/Message.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir/Message.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir/Message.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,13 +1,13 @@
 
+use strict;
+use warnings;
+
 package Mail::Box::Maildir::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Dir::Message';
 
-use strict;
 use File::Copy;
-use Carp;
-use warnings;
 
 
 sub filename(;$)
@@ -32,11 +32,13 @@
      , replied => ($flags{R} || 0)
      , seen    => ($flags{S} || 0)
      , deleted => ($flags{T} || 0)
+
+     , passed  => ($flags{P} || 0)   # uncommon
      );
 
-    if(defined $oldname)
-    {   move $oldname, $newname
-           or confess "Cannot move $oldname to $newname: $!";
+    if(defined $oldname && ! move $oldname, $newname)
+    {   $self->log(ERROR => "Cannot move $oldname to $newname: $!");
+        return undef;
     }
 
     $self->SUPER::filename($newname);
@@ -79,6 +81,7 @@
     my $newflags    # alphabeticly ordered!
       = ($labels->{draft}   ? 'D' : '')
       . ($labels->{flagged} ? 'F' : '')
+      . ($labels->{passed}  ? 'P' : '')
       . ($labels->{replied} ? 'R' : '')
       . ($labels->{seen}    ? 'S' : '')
       . ($labels->{deleted} ? 'T' : '');
@@ -93,7 +96,7 @@
 
     if($new ne $old)
     {   unless(move $old, $new)
-        {   warn "Cannot rename $old to $new: $!";
+        {   $self->log(ERROR => "Cannot rename $old to $new: $!");
             return;
         }
         $self->log(PROGRESS => "Moved $old to $new.");

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir/Message.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir/Message.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir/Message.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -32,7 +32,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -40,14 +40,6 @@
 
 =back
 
-Mail::Box::Maildir::Message-E<gt>B<coerce>(MESSAGE)
-
-=over 4
-
-See L<Mail::Box::Message/"METHODS">
-
-=back
-
 Mail::Box::Maildir::Message-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -67,7 +59,7 @@
 
 =back
 
-Mail::Box::Maildir::Message-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Box::Maildir::Message-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -189,22 +181,50 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<copyTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
+$obj-E<gt>B<filename>([FILENAME])
+
+=over 4
+
+Returns the current filename for this message.  If the FILENAME argument
+is specified, a new filename will be set.  For maildir messages this
+means that modifications are immediately performed: there will be
+a rename (move) from the old name to the new name.  Labels may change
+within in the message object as well.
+
+=back
+
+$obj-E<gt>B<folder>([FOLDER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<isDummy>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -212,7 +232,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -220,15 +240,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<moveTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<print>([FILEHANDLE])
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -236,15 +264,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<seqnr>([INTEGER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<size>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -252,7 +288,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -260,7 +296,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -527,7 +563,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -543,81 +579,50 @@
 
 =back
 
-=head2 The message
+=head2 Labels
 
 
-$obj-E<gt>B<copyTo>(FOLDER)
+$obj-E<gt>B<labelsToFilename>
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+When the labels on a message change, this may implicate a change in
+the message's filename.  The change will take place immediately.  The
+new filename (which may be the same as the old filename) is returned.
+C<undef> is returned when the rename is required but fails.
 
 =back
 
-$obj-E<gt>B<filename>([FILENAME])
+=head2 Internals
 
-=over 4
 
-Returns the current filename for this message.  If the FILENAME argument
-is specified, a new filename will be set.  For maildir messages this
-means that modifications are immediately performed: there will be
-a rename (move) from the old name to the new name.  Labels may change
-within in the message object as well.
+$obj-E<gt>B<accept>([BOOLEAN])
 
-=back
-
-$obj-E<gt>B<folder>([FOLDER])
-
 =over 4
 
-See L<Mail::Box::Message/"The message">
+Accept a message for the folder.  This will move it from the C<new>
+or C<tmp> sub-directories into the C<cur> sub-directory (or back when
+the BOOLEAN is C<false>).  When you accept an already accepted message,
+nothing will happen.
 
 =back
 
-$obj-E<gt>B<moveTo>(FOLDER)
+$obj-E<gt>B<clonedFrom>
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<seqnr>([INTEGER])
+Mail::Box::Maildir::Message-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-=head2 Labels
-
-
-$obj-E<gt>B<labelsToFilename>
-
-=over 4
-
-When the labels on a message change, this may implicate a change in
-the message's filename.  The change will take place immediately.  The
-new filename (which may be the same as the old filename) is returned.
-C<undef> is returned when the rename is required but fails.
-
-=back
-
-=head2 Internals
-
-
-$obj-E<gt>B<accept>([BOOLEAN])
-
-=over 4
-
-Accept a message for the folder.  This will move it from the C<new>
-or C<tmp> sub-directories into the C<cur> sub-directory (or back when
-the BOOLEAN is C<false>).  When you accept an already accepted message,
-nothing will happen.
-
-=back
-
 $obj-E<gt>B<create>(FILENAME)
 
 =over 4
@@ -733,9 +738,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Maildir::Message-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Maildir::Message-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -901,10 +906,18 @@
 
 I<Error:> No default mailer found to send message.
 
-The message L<send()|Mail::Message/"The Message"> mechanism had not enough information to automatically
+The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
 find a mail transfer agent to sent this message.  Specify a mailer
 explicitly using the C<via> options.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message/"Internals">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -927,6 +940,14 @@
 a message is used for the first time here, but has disappeared or is
 unreadible for some other reason.
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -958,7 +979,7 @@
  my ($time, $unique, $hostname, $info)
     = $filename =~ m!^(\d+)\.(.*)\.(\w+)(\:.*)?$!;
  my ($semantics, $flags)
-    = $info =~ m!([12])\,([RSTDF]+)$!;
+    = $info =~ m!([12])\,([DFPRST]*)$!;
  my @flags = split //, $flags;
 
 When an application opens the folder, there may be messages in C<new>
@@ -988,6 +1009,9 @@
  S      => seen
  T      => deleted  (tagged for deletion)
 
+Some maildir clients support
+ P      => passed   (resent/forwarded/bounced to someone else)
+
 The flags will immediately change when L<label()|Mail::Message/"Flags"> or L<delete()|Mail::Message/"Flags"> is used,
 which differs from other message implementations: maildir is stateless,
 and should not break when applications crash.
@@ -1002,7 +1026,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -2,15 +2,16 @@
 use strict;
 package Mail::Box::Maildir;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Dir';
 
 use Mail::Box::Maildir::Message;
 
 use Carp;
-use File::Copy;
+use File::Copy     'move';
 use File::Basename 'basename';
-use Sys::Hostname;
+use Sys::Hostname  'hostname';
+use File::Remove   'remove';
 
 # Maildir is only supported on UNIX, because the filenames probably
 # do not work on other platforms.  Since MailBox 2.052, the use of
@@ -123,13 +124,6 @@
 
 #-------------------------------------------
 
-sub nameOfSubFolder($)
-{   my ($self, $name) = @_;
-    $self->directory.'/'.$name;
-}
-
-#-------------------------------------------
-
 sub openSubFolder($@)
 {   my ($self, $name) = (shift, shift);
     $self->createDirs($self->nameOfSubFolder($name));
@@ -138,14 +132,18 @@
 
 #-------------------------------------------
 
+sub topFolderWithMessages() { 1 }
+
+#-------------------------------------------
+
 my $uniq = rand 1000;
 
 
 sub coerce($)
-{   my ($self, $message) = @_;
+{   my ($self, $message) = (shift, shift);
 
     my $is_native = $message->isa('Mail::Box::Maildir::Message');
-    my $coerced   = $self->SUPER::coerce($message);
+    my $coerced   = $self->SUPER::coerce($message, @_);
 
     my $basename  = $is_native ? basename($message->filename)
       : ($message->timestamp || time) .'.'. hostname .'.'. $uniq++;
@@ -168,19 +166,19 @@
 sub createDirs($)
 {   my ($thing, $dir) = @_;
 
-    $thing->log(ERROR => "Cannot create Maildir folder directory $dir: $!\n"), return
+    $thing->log(ERROR => "Cannot create Maildir folder directory $dir: $!"), return
         unless -d $dir || mkdir $dir;
 
     my $tmp = "$dir/tmp";
-    $thing->log(ERROR => "Cannot create Maildir folder subdir $tmp: $!\n"), return
+    $thing->log(ERROR => "Cannot create Maildir folder subdir $tmp: $!"), return
         unless -d $tmp || mkdir $tmp;
 
     my $new = "$dir/new";
-    $thing->log(ERROR => "Cannot create Maildir folder subdir $new: $!\n"), return
+    $thing->log(ERROR => "Cannot create Maildir folder subdir $new: $!"), return
         unless -d $new || mkdir $new;
 
     my $cur = "$dir/cur";
-    $thing->log(ERROR =>  "Cannot create Maildir folder subdir $cur: $!\n"), return
+    $thing->log(ERROR =>  "Cannot create Maildir folder subdir $cur: $!"), return
         unless -d $cur || mkdir $cur;
 
     $thing;
@@ -219,6 +217,15 @@
 
 #-------------------------------------------
 
+sub delete(@)
+{   my $self = shift;
+
+    # Subfolders are not nested in the directory structure
+    remove \1, $self->directory;
+}
+
+#-------------------------------------------
+
 sub readMessageFilenames
 {   my ($self, $dirname) = @_;
 
@@ -361,12 +368,20 @@
     croak "Cannot create directory $tmpdir: $!", return
         unless -d $tmpdir || mkdir $tmpdir;
 
+    my $msgtype  = $args{message_type} || 'Mail::Box::Maildir::Message';
+
     foreach my $message (@messages)
-    {   my $is_native = $message->isa('Mail::Box::Maildir::Message');
-        my $coerced   = $self->SUPER::coerce($message);
+    {   my $is_native = $message->isa($msgtype);
+        my ($basename, $coerced);
 
-        my $basename  = $is_native ? basename($message->filename)
-         : ($message->timestamp || time) .'.'. hostname .'.'. $uniq++;
+        if($is_native)
+        {   $coerced  = $message;
+            $basename = basename $message->filename;
+        }
+        else
+        {   $coerced  = $self->SUPER::coerce($message);
+            $basename = ($message->timestamp||time).'.'. hostname.'.'.$uniq++;
+        }
 
        my $dir = $self->directory;
        my $tmp = "$dir/tmp/$basename";

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Maildir.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -61,19 +61,6 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<create>(FOLDERNAME, OPTIONS)
-
-Mail::Box::Maildir-E<gt>B<create>(FOLDERNAME, OPTIONS)
-
-=over 4
-
- Option     Defined in    Default
- folderdir  L<Mail::Box>  undef  
-
-. folderdir DIRECTORY
-
-=back
-
 Mail::Box::Maildir-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -85,6 +72,7 @@
  body_type          L<Mail::Box>     L<Mail::Message::Body::Lines|Mail::Message::Body::Lines>        
  coerce_options     L<Mail::Box>     C<[]>                                                           
  create             L<Mail::Box>     <false>                                                         
+ directory          L<Mail::Box::Dir>  <derived from folder name>                                      
  extract            L<Mail::Box>     C<10240>                                                        
  field_type         L<Mail::Box>     undef                                                           
  fix_headers        L<Mail::Box>     <false>                                                         
@@ -128,6 +116,8 @@
 
 . create BOOLEAN
 
+. directory DIRECTORY
+
 . extract INTEGER | CODE | METHOD | 'LAZY'|'ALWAYS'
 
 . field_type CLASS
@@ -175,7 +165,7 @@
 =head2 The folder
 
 
-$obj-E<gt>B<addMessage>(MESSAGE)
+$obj-E<gt>B<addMessage>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -215,7 +205,7 @@
 
 =back
 
-$obj-E<gt>B<delete>
+$obj-E<gt>B<delete>(OPTIONS)
 
 =over 4
 
@@ -239,14 +229,6 @@
 
 =back
 
-Mail::Box::Maildir-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
-
-=over 4
-
-See L<Mail::Box/"The folder">
-
-=back
-
 $obj-E<gt>B<name>
 
 =over 4
@@ -298,6 +280,14 @@
 =head2 Folder flags
 
 
+$obj-E<gt>B<access>
+
+=over 4
+
+See L<Mail::Box/"Folder flags">
+
+=back
+
 $obj-E<gt>B<isModified>
 
 =over 4
@@ -381,6 +371,14 @@
 
 =back
 
+$obj-E<gt>B<nrMessages>(OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"The messages">
+
+=back
+
 $obj-E<gt>B<scanForMessages>(MESSAGE, MESSAGE-IDS, TIMESPAN, WINDOW)
 
 =over 4
@@ -402,8 +400,10 @@
 
 =back
 
-$obj-E<gt>B<nameOfSubFolder>(NAME)
+$obj-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
 
+Mail::Box::Maildir-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
+
 =over 4
 
 See L<Mail::Box/"Sub-folders">
@@ -418,7 +418,7 @@
 
 =back
 
-$obj-E<gt>B<openSubFolder>(NAME, OPTIONS)
+$obj-E<gt>B<openSubFolder>(SUBNAME, OPTIONS)
 
 =over 4
 
@@ -426,6 +426,16 @@
 
 =back
 
+$obj-E<gt>B<topFolderWithMessages>
+
+Mail::Box::Maildir-E<gt>B<topFolderWithMessages>
+
+=over 4
+
+See L<Mail::Box/"Sub-folders">
+
+=back
+
 =head2 Internals
 
 
@@ -445,12 +455,25 @@
 
 =back
 
-$obj-E<gt>B<coerce>(MESSAGE)
+$obj-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
 =back
 
+$obj-E<gt>B<create>(FOLDERNAME, OPTIONS)
+
+Mail::Box::Maildir-E<gt>B<create>(FOLDERNAME, OPTIONS)
+
+=over 4
+
+ Option     Defined in    Default
+ folderdir  L<Mail::Box>  undef  
+
+. folderdir DIRECTORY
+
+=back
+
 $obj-E<gt>B<createDirs>(FOLDERDIR)
 
 Mail::Box::Maildir-E<gt>B<createDirs>(FOLDERDIR)
@@ -496,6 +519,14 @@
 
 =back
 
+Mail::Box::Maildir-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"Internals">
+
+=back
+
 $obj-E<gt>B<lineSeparator>([STRING|'CR'|'LF'|'CRLF'])
 
 =over 4
@@ -616,9 +647,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Maildir-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Maildir-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -852,7 +883,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Copied: packages/libmail-box-perl/trunk/lib/Mail/Box/Manage (from rev 840, packages/libmail-box-perl/branches/upstream/current/lib/Mail/Box/Manage)

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Manager.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Manager.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Manager.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Box::Manager;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use Mail::Box;
@@ -21,6 +21,8 @@
   , [ maildir => 'Mail::Box::Maildir' ]
   , [ pop     => 'Mail::Box::POP3'    ]
   , [ pop3    => 'Mail::Box::POP3'    ]
+  , [ imap    => 'Mail::Box::IMAP4'   ]
+  , [ imap4   => 'Mail::Box::IMAP4'   ]
   );
 
 my @managers;  # usually only one, but there may be more around :(
@@ -47,11 +49,11 @@
     $self->{MBM_folder_types} = [];
     $self->registerType(@$_) foreach @new_types, @basic_types;
 
-    $self->{MBM_default_type} = $args->{default_folder_type};
+    $self->{MBM_default_type} = $args->{default_folder_type} || 'mbox';
 
     # Inventory on existing folder-directories.
 
-    $self->{MBM_folderdirs} = [ '.' ];
+    $self->{MBM_folderdirs} = [ ];
     if(exists $args->{folderdir})
     {   my @dirs = $args->{folderdir};
         @dirs = @{$dirs[0]} if ref $dirs[0];
@@ -63,6 +65,7 @@
         @dirs = @{$dirs[0]} if ref $dirs[0];
         push @{$self->{MBM_folderdirs}}, @dirs;
     }
+    push @{$self->{MBM_folderdirs}}, '.';
 
     $self->{MBM_folders} = [];
     $self->{MBM_threads} = [];
@@ -85,6 +88,14 @@
 #-------------------------------------------
 
 
+sub folderdir()
+{   my $dirs = shift->{MBM_folderdirs} or return ();
+    wantarray ? @$dirs : $dirs->[0];
+}
+
+#-------------------------------------------
+
+
 sub folderTypes()
 {   my $self = shift;
     my %uniq;
@@ -92,7 +103,21 @@
     sort keys %uniq;
 }
 
+#-------------------------------------------
 
+
+sub defaultFolderType()
+{   my $self = shift;
+    my $name = $self->{MBM_default_type};
+    return $name if $name =~ m/\:\:/;  # obviously a class name
+
+    foreach my $def (@{$self->{MBM_folder_types}})
+    {   return $def->[1] if $def->[0] eq $name || $def->[1] eq $name;
+    }
+
+    undef;
+}
+
 #-------------------------------------------
 
 
@@ -100,15 +125,11 @@
 {   my $self = shift;
     my $name = @_ % 2 ? shift : undef;
     my %args = @_;
+    $args{authentication} ||= 'AUTO';
 
-    $name    = defined $args{folder} ? $args{folder} : $ENV{MAIL}
+    $name    = defined $args{folder} ? $args{folder} : ($ENV{MAIL} || '')
         unless defined $name;
 
-    unless(defined $name)
-    {   $self->log(ERROR => "Don't know which folder I should open: no name.");
-        return undef;
-    }
-      
     if($name =~ m/^(\w+)\:/ && grep { $_ eq $1 } $self->folderTypes)
     {   # Complicated folder URL
         my %decoded = $self->decodeFolderURL($name);
@@ -126,8 +147,16 @@
         $args{folder} = $name;
     }
 
+    my $type = $args{type};
+    if(defined $type && $type eq 'pop3')
+    {   my $un   = $args{username}    ||= $ENV{USER} || $ENV{LOGIN};
+        my $srv  = $args{server_name} ||= 'localhost';
+        my $port = $args{server_port} ||= 110;
+        $args{folder} = $name = "pop3://$un\@$srv:$port";
+    }
+
     unless(defined $name && length $name)
-    {   $self->log(ERROR => "No foldername specified to open.\n");
+    {   $self->log(ERROR => "No foldername specified to open.");
         return undef;
     }
         
@@ -144,7 +173,7 @@
 
     # Do not open twice.
     if(my $folder = $self->isOpenFolder($name))
-    {   $self->log(WARNING => "Folder $name is already open.\n");
+    {   $self->log(ERROR => "Folder $name is already open.");
         return undef;
     }
 
@@ -153,7 +182,7 @@
     #
 
     my ($folder_type, $class, @defaults);
-    if(my $type = $args{type})
+    if($type)
     {   # User-specified foldertype prevails.
         foreach (@{$self->{MBM_folder_types}})
         {   (my $abbrev, $class, @defaults) = @$_;
@@ -210,9 +239,10 @@
 
     push @defaults, manager => $self;
     my $folder = $class->new(@defaults, %args);
-
     unless(defined $folder)
-    {   $self->log(WARNING =>"Folder does not exist, failed opening $folder_type folder $name.");
+    {   $self->log(WARNING =>
+           "Folder does not exist, failed opening $folder_type folder $name.")
+           unless $args{access} eq 'd';
         return;
     }
 
@@ -238,7 +268,7 @@
 
 
 sub close($@)
-{   my ($self, $folder, @options) = @_;
+{   my ($self, $folder, %options) = @_;
     return unless $folder;
 
     my $name      = $folder->name;
@@ -250,7 +280,9 @@
     $self->{MBM_folders} = [ @remaining ];
     $_->removeFolder($folder) foreach @{$self->{MBM_threads}};
 
-    $folder->close(close_by_manager => 1, @options);
+    $folder->close(close_by_manager => 1, %options)
+       unless $options{close_by_self};
+
     $self;
 }
 
@@ -269,9 +301,13 @@
 
 
 sub delete($@)
-{   my ($self, $name, @options) = @_;
-    my $folder = $self->open(folder => $name, @options) or return;
-    $folder->delete;
+{   my ($self, $name, %args) = @_;
+    my $recurse = delete $args{recursive};
+
+    my $folder = $self->open(folder => $name, access => 'd', %args)
+        or return $self;  # still successful
+
+    $folder->delete(recursive => $recurse);
 }
 
 #-------------------------------------------
@@ -373,8 +409,9 @@
         push @messages, $message;
     }
 
-    my %options = @_;
-    $folder ||= $options{folder};
+    my %args = @_;
+    $folder ||= $args{folder};
+    my $share   = exists $args{share} ? $args{share} : $args{_delete};
 
     # Try to resolve filenames into opened-files.
     $folder = $self->isOpenFolder($folder) || $folder
@@ -382,11 +419,11 @@
 
     my @coerced
      = ref $folder
-     ? map {$_->copyTo($folder)} @messages
-     : $self->appendMessages(@messages, %options, folder => $folder);
+     ? map {$_->copyTo($folder, share => $args{share})} @messages
+     : $self->appendMessages(@messages, %args, folder => $folder);
 
     # hidden option, do not use it: it's designed to optimize moveMessage
-    if($options{_delete})
+    if($args{_delete})
     {   $_->label(deleted => 1) foreach @messages;
     }
 
@@ -424,7 +461,7 @@
        :                           $folders
        );
 
-    $self->log(INTERNAL => "No folders specified.\n")
+    $self->log(INTERNAL => "No folders specified.")
        unless @folders;
 
     my $threads;
@@ -488,10 +525,11 @@
     $username ||= $ENV{USER} || $ENV{LOGNAME};
 
     $password ||= '';        # decode password from url
-    $password =~ s/\+/ /g;
-    $password =~ s/\%([A-Fa-f0-9]{2})/chr hex $1/ge;
+    $password   =~ s/\+/ /g;
+    $password   =~ s/\%([A-Fa-f0-9]{2})/chr hex $1/ge;
 
     $hostname ||= 'localhost';
+
     $path     ||= '=';
 
     ( type        => $type,     folder      => $path
@@ -503,4 +541,5 @@
 #-------------------------------------------
 
 
+
 1;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Manager.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Manager.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Manager.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -9,7 +9,10 @@
  Mail::Box::Manager
    is a Mail::Reporter
 
+ Mail::Box::Manager is extended by
+   Mail::Box::Manage::User
 
+
 =head1 SYNOPSIS
 
  use Mail::Box::Manager;
@@ -81,7 +84,7 @@
 
 Specifies the default folder type for newly created folders.  If this
 option is not specified, the most recently registered type is used (see
-L<registerType()|Mail::Box::Manager/"Manage folders"> and the L<new(folder_types)|Mail::Box::Manager/"METHODS"> option.
+L<registerType()|Mail::Box::Manager/"Attributes"> and the L<new(folder_types)|Mail::Box::Manager/"METHODS"> option.
 
 =back
 
@@ -105,7 +108,7 @@
 =over 4
 
 The default directory, or directories, where folders are
-located.  C<Mail::Box::Manager> can autodetect the existing folder-types.
+located. The C<Mail::Box::Manager> can autodetect the existing folder-types.
 There may be different kinds of folders opened at the same time, and
 messages can be moved between those types, although that may result in
 a loss of information depending on the folder types.
@@ -120,65 +123,102 @@
 
 =back
 
-=head2 Manage folders
+=head2 Attributes
 
 
-$obj-E<gt>B<close>(FOLDER, OPTIONS)
+$obj-E<gt>B<defaultFolderType>
 
 =over 4
 
-C<close> removes the specified folder from the list of open folders.
-Indirectly it will update the files on disk if needed (depends on
-the L<Mail::Box::new(save_on_exit)|Mail::Box/"Constructors"> flag for each folder). OPTIONS are
-passed to L<Mail::Box::close()|Mail::Box/"The folder"> of the folder.
+Returns the default folder type, some class name.
 
-The folder's messages will also be withdrawn from the known message threads.
-You may also close the folder directly. The manager will be informed
-about this event and take appropriate actions.
+=back
 
+$obj-E<gt>B<folderTypes>
+
+=over 4
+
+Returns the list of currently defined folder types.
+
 I<Example:> 
 
- my $inbox = $mgr->open('inbox');
- $mgr->close($inbox);
- $inbox->close;        # alternative
+ print join("\n", $manager->folderTypes), "\n";
 
 =back
 
-$obj-E<gt>B<closeAllFolders>(, OPTIONS)
+$obj-E<gt>B<folderdir>
 
 =over 4
 
-C<closeAllFolders> calls close() for each folder managed by
-this object.  It is called just before the program stops (before global
-cleanup).
+In list context, this returns all folderdirs specified.  In SCALAR
+context only the first.
 
 =back
 
-$obj-E<gt>B<delete>(FOLDERNAME [,OPTIONS])
+$obj-E<gt>B<registerType>(TYPE, CLASS [,OPTIONS])
 
 =over 4
 
-Remove the named folder, including all its sub-folders.  The OPTIONS
-are the same as those for L<open()|Mail::Box::Manager/"Manage folders">.
+With C<registerType> you can register one TYPE of folders.  The CLASS
+is compiled automatically, so you do not need to C<use> them in your own
+modules.  The TYPE is just an arbitrary name.
 
-The deletion of a folder can take some time.  Dependent on the type of
-folder, the folder must be read first.  For some folder-types this will
-be fast.
+The added types are prepended to the list of known types, so they are
+checked first when a folder is opened in autodetect mode.
 
+I<Example:> 
+
+ $manager->registerType(mbox => 'Mail::Box::Mbox',
+     save_on_exit => 0, folderdir => '/tmp');
+
 =back
 
-$obj-E<gt>B<folderTypes>
+=head2 Manage open folders
 
+
+$obj-E<gt>B<close>(FOLDER, OPTIONS)
+
 =over 4
 
-Returns the list of currently defined folder types.
+C<close> removes the specified folder from the list of open folders.
+Indirectly it will update the files on disk if needed (depends on
+the L<Mail::Box::new(save_on_exit)|Mail::Box/"Constructors"> flag for each folder). OPTIONS are
+passed to L<Mail::Box::close()|Mail::Box/"The folder"> of the folder.
 
+The folder's messages will also be withdrawn from the known message threads.
+You may also close the folder directly. The manager will be informed
+about this event and take appropriate actions.
+
+ Option         Defined in  Default
+ close_by_self              <false>
+
+. close_by_self BOOLEAN
+
+=over 4
+
+Used internally to avoid confusion about how the close was started.  Do
+not change this.
+
+=back
+
 I<Example:> 
 
- print join("\n", $manager->folderTypes), "\n";
+ my $inbox = $mgr->open('inbox');
+ $mgr->close($inbox);
+ $inbox->close;        # alternative
 
 =back
 
+$obj-E<gt>B<closeAllFolders>(, OPTIONS)
+
+=over 4
+
+C<closeAllFolders> calls close() for each folder managed by
+this object.  It is called just before the program stops (before global
+cleanup).
+
+=back
+
 $obj-E<gt>B<isOpenFolder>(FOLDER)
 
 =over 4
@@ -204,12 +244,24 @@
 description of the folder options, see the options to the constructor
 L<Mail::Box::new()|Mail::Box/"Constructors"> for each type of mail box.
 
- Option     Defined in       Default                 
- create                      <false>                 
- folder                      C<$ENV{MAIL}>           
- folderdir                   C<'.'>                  
- type                        <first, usually C<mbox>>
+ Option        Defined in       Default                 
+ authenticate                   C<'AUTO'>               
+ create                         <false>                 
+ folder                         C<$ENV{MAIL}>           
+ folderdir                      C<'.'>                  
+ type                           <first, usually C<mbox>>
 
+. authenticate TYPE|ARRAY-OF-TYPES|'AUTO'
+
+=over 4
+
+The TYPE of authentication to be used, or a list of TYPES which the
+client prefers.  The server may provide preferences as well, and that
+order will be kept.  This option is only supported by a small subset of
+folder types, especially by POP and IMAP.
+
+=back
+
 . create BOOLEAN
 
 =over 4
@@ -289,24 +341,32 @@
 
 =back
 
-$obj-E<gt>B<registerType>(TYPE, CLASS [,OPTIONS])
+=head2 Manage existing folders
 
+
+$obj-E<gt>B<delete>(FOLDERNAME, OPTIONS)
+
 =over 4
 
-With C<registerType> you can register one TYPE of folders.  The CLASS
-is compiled automatically, so you do not need to C<use> them in your own
-modules.  The TYPE is just an arbitrary name.
+Remove the named folder.  The OPTIONS are the same as those for L<open()|Mail::Box::Manager/"Manage open folders">.
 
-The added types are prepended to the list of known types, so they are
-checked first when a folder is opened in autodetect mode.
+The deletion of a folder can take some time.  Dependent on the type of
+folder, the folder must be read first.  For some folder-types this will
+be fast.
 
-I<Example:> 
+ Option     Defined in  Default           
+ recursive              <folder's default>
 
- $manager->registerType(mbox => 'Mail::Box::Mbox',
-     save_on_exit => 0, folderdir => '/tmp');
+. recursive BOOLEAN
 
+=over 4
+
+Some folder can only be recursively deleted, other have more flexibility.
+
 =back
 
+=back
+
 =head2 Move messages to folders
 
 
@@ -351,15 +411,26 @@
 =over 4
 
 Copy a message from one folder into another folder.  If the destination
-folder is already opened, the copied message is stored in memory and
-written to disk when a write of the folder is later performed. Otherwise,
-the destination folder will be opened, the message written, and then the
-folder closed.
+folder is already opened, L<Mail::Box::copyTo()|Mail::Box/"The folder"> is used.  Otherwise,
+L<Mail::Box::appendMessages()|Mail::Box/"The folder"> is called.
 
 You need to specify a folder's name or folder object as the first
 argument, or in the options list.  The options are the same as those
 which can be specified when opening a folder.
 
+ Option  Defined in  Default
+ share               <false>
+
+. share BOOLEAN
+
+=over 4
+
+Try to share the physical storage of the messages.  The folder types
+may be different, but it all depends on the actual folder where the
+message is copied to.  Silently ignored when not possible to share.
+
+=back
+
 I<Example:> 
 
  my $drafts = $mgr->open(folder => 'Drafts');
@@ -367,7 +438,7 @@
  $mgr->copyMessage($outbox, $drafts->message(0));
 
  my @messages = $drafts->message(1,2);
- $mgr->copyMessage('=Trash', @messages.
+ $mgr->copyMessage('=Trash', @messages,
     folderdir => '/tmp', create => 1);
 
  $mgr->copyMessage($drafts->message(1),
@@ -388,9 +459,14 @@
 
 is equivalent to
 
- $mgr->copyMessage($received, $inbox->message(1));
+ $mgr->copyMessage($received, $inbox->message(1), share => 1);
  $inbox->message(1)->delete;
 
+ Option  Defined in  Default
+ share               <true> 
+
+. share BOOLEAN
+
 =back
 
 =head2 Manage message threads
@@ -464,9 +540,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Manager-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Manager-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -573,11 +649,8 @@
 
 =head1 DIAGNOSTICS
 
-I<Error:> Don't know which folder I should open: no name
+I<Error:> Folder $name is already open.
 
-
-I<Warning:> Folder $name is already open.
-
 You cannot ask the manager for a folder which is already open. In some
 older releases (before MailBox 2.049), this was permitted, but then
 behaviour changed, because many nasty side-effects are to be expected.
@@ -593,7 +666,7 @@
 I<Warning:> Folder does not exist, failed opening $type folder $name.
 
 The folder does not exist and creating is not permitted (see
-L<open(create)|Mail::Box::Manager/"Manage folders">) or did not succeed.  When you do not have sufficient
+L<open(create)|Mail::Box::Manager/"Manage open folders">) or did not succeed.  When you do not have sufficient
 access rights to the folder (for instance wrong password for POP3),
 this warning will be produced as well.
 
@@ -605,7 +678,7 @@
 
 I<Warning:> Folder type $type is unknown, using autodetect.
 
-The specified folder type (see L<open(type)|Mail::Box::Manager/"Manage folders">, possibly derived from
+The specified folder type (see L<open(type)|Mail::Box::Manager/"Manage open folders">, possibly derived from
 the folder name when specified as url) is not known to the manager.
 This may mean that you forgot to require the L<Mail::Box|Mail::Box> extension
 which implements this folder type, but probably it is a typo.  Usually,
@@ -643,24 +716,87 @@
 to a different folder.  You need to decide between copy or move, which
 both will clone the message (not the body, because they are immutable).
 
-I<Error:> Will never create a folder $name without having write access.
+I<Warning:> Will never create a folder $name without having write access.
 
-You have set L<open(create)|Mail::Box::Manager/"Manage folders">, but only want to read the folder.  Create is
+You have set L<open(create)|Mail::Box::Manager/"Manage open folders">, but only want to read the folder.  Create is
 only useful for folders which have write or append access modes
 (see L<Mail::Box::new(access)|Mail::Box/"Constructors">).
 
 
+=head1 DETAILS
 
+On many places in the documentation you can read that it is useful to
+have a manager object.  There are two of them: the L<Mail::Box::Manager|Mail::Box::Manager>,
+which maintains a set of open folders, and an extension of it: the
+L<Mail::Box::Manage::User|Mail::Box::Manage::User>.
 
+=head2 Managing open folders
 
+It is useful to start your program by creating a folder manager object,
+an L<Mail::Box::Manager|Mail::Box::Manager>.  The object takes a few burdons from your neck:
 
+=over 4
+
+=item * autodetect the type of folder which is used.
+
+This means that your application can be fully folder type independent.
+
+=item * autoload the required modules
+
+There are so many modules involved in MailBox, that it is useful to
+have some lazy autoloading of code.  The manager knows which modules
+belong to which type of folder.
+
+=item * avoid double openings
+
+Your programming mistakes may cause the same folder to be opened twice.
+The result of that could be very destructive.  Therefore, the manager
+keeps track on all open folders and avoids the same folder to be opened
+for the second time.
+
+=item * close folders at clean-up
+
+When the program is ending, the manager will cleanly close all folders
+which are still open.  This is required, because the autodestruct
+sequence of Perl works in an unpredicatable order.
+
+=item * message thread detection
+
+MailBox can discover message threads which span multiple folders. Any set
+of open folders may be grouped in a tree of replies on replies on replies.
+When a folder is closed, it will automatically be removed from the threads,
+
+and a new folder can dynamically be added to the structure.
+=back
+
+The manager is really simplifying things, and should therefore be the
+base of all programs. However, it is possible to write useful programs
+without it.
+
+=head2 Managing a user
+
+One step further is the L<Mail::Box::Manage::User|Mail::Box::Manage::User> object (since MailBox
+v2.057), which not only keeps track on open folders, but also collects
+information about not-open folders.
+
+The user class is, as the name says, targeted on managing one single user.
+Where the L<Mail::Box::Manager|Mail::Box::Manager> will open any set of folder files, probably
+from multiple users, the user class want one root folder directory.
+
+In many aspects, the user manager simplifies the task for user-based servers
+and other user-centric applications by setting smart defaults.
+
+
+
+
+
 =head1 REFERENCES
 
 See the MailBox website at L<http://perl.overmeer.net/mailbox/> for more details.
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox/Message.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox/Message.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox/Message.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -2,7 +2,7 @@
 use strict;
 package Mail::Box::Mbox::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::File::Message';
 
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox/Message.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox/Message.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox/Message.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -31,7 +31,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -39,14 +39,6 @@
 
 =back
 
-Mail::Box::Mbox::Message-E<gt>B<coerce>(MESSAGE)
-
-=over 4
-
-See L<Mail::Box::Message/"METHODS">
-
-=back
-
 Mail::Box::Mbox::Message-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -66,7 +58,7 @@
 
 =back
 
-Mail::Box::Mbox::Message-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Box::Mbox::Message-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -188,22 +180,46 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<copyTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
+$obj-E<gt>B<folder>([FOLDER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
+$obj-E<gt>B<fromLine>([LINE])
+
+=over 4
+
+See L<Mail::Box::File::Message/"The message">
+
+=back
+
 $obj-E<gt>B<isDummy>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -211,7 +227,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -219,15 +235,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<moveTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<print>([FILEHANDLE])
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -235,15 +259,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<seqnr>([INTEGER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<size>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -251,7 +283,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -523,7 +555,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -539,52 +571,25 @@
 
 =back
 
-=head2 The message
+=head2 Internals
 
 
-$obj-E<gt>B<copyTo>(FOLDER)
+$obj-E<gt>B<clonedFrom>
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<folder>([FOLDER])
+Mail::Box::Mbox::Message-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<fromLine>([LINE])
-
-=over 4
-
-See L<Mail::Box::File::Message/"The message">
-
-=back
-
-$obj-E<gt>B<moveTo>(FOLDER)
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-$obj-E<gt>B<seqnr>([INTEGER])
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-=head2 Internals
-
-
 $obj-E<gt>B<diskDelete>
 
 =over 4
@@ -692,9 +697,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Mbox::Message-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Mbox::Message-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -843,10 +848,18 @@
 
 I<Error:> No default mailer found to send message.
 
-The message L<send()|Mail::Message/"The Message"> mechanism had not enough information to automatically
+The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
 find a mail transfer agent to sent this message.  Specify a mailer
 explicitly using the C<via> options.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message/"Internals">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -858,6 +871,14 @@
 I<Error:> Unable to read delayed body.
 
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -881,7 +902,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -2,7 +2,7 @@
 use strict;
 package Mail::Box::Mbox;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::File';
 
 use Mail::Box::Mbox::Message;
@@ -66,6 +66,16 @@
 
 #-------------------------------------------
 
+sub delete(@)
+{   my $self = shift;
+    $self->SUPER::delete(@_);
+
+    my $subfdir = $self->filename . $default_sub_extension;
+    rmdir $subfdir;   # may fail, when there are still subfolders (no recurse)
+}
+
+#-------------------------------------------
+
 sub writeMessages($)
 {   my ($self, $args) = @_;
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Mbox.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -58,31 +58,6 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<create>(FOLDERNAME, OPTIONS)
-
-Mail::Box::Mbox-E<gt>B<create>(FOLDERNAME, OPTIONS)
-
-=over 4
-
- Option               Defined in       Default
- folderdir            L<Mail::Box>     undef  
- subfolder_extension                   undef  
-
-. folderdir DIRECTORY
-
-. subfolder_extension STRING
-
-=over 4
-
-If a directory is found on the location of the folder to be created, this
-STRING is used to extend that directory name with.  This will cause the
-directory to be seen as sub-folder for the created folder.  This argument
-is passed to L<folderToFilename()|Mail::Box::Mbox/"Internals">.
-
-=back
-
-=back
-
 Mail::Box::Mbox-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -190,7 +165,7 @@
 =head2 The folder
 
 
-$obj-E<gt>B<addMessage>(MESSAGE)
+$obj-E<gt>B<addMessage>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -230,7 +205,7 @@
 
 =back
 
-$obj-E<gt>B<delete>
+$obj-E<gt>B<delete>(OPTIONS)
 
 =over 4
 
@@ -254,28 +229,6 @@
 
 =back
 
-Mail::Box::Mbox-E<gt>B<foundIn>([FOLDERNAME], [OPTIONS])
-
-=over 4
-
-If no FOLDERNAME is specified, then the value of the C<folder> option
-is taken.  A mbox folder is a file which starts with a separator
-line: a line with C<'From '> as first characters.  Blank lines which
-start the file are ignored, which is not for all MUA's acceptable.
-
- Option               Defined in       Default      
- folder                                undef        
- folderdir            L<Mail::Box>     undef        
- subfolder_extension                   <from object>
-
-. folder FOLDERNAME
-
-. folderdir DIRECTORY
-
-. subfolder_extension STRING
-
-=back
-
 $obj-E<gt>B<name>
 
 =over 4
@@ -327,6 +280,14 @@
 =head2 Folder flags
 
 
+$obj-E<gt>B<access>
+
+=over 4
+
+See L<Mail::Box/"Folder flags">
+
+=back
+
 $obj-E<gt>B<isModified>
 
 =over 4
@@ -410,6 +371,14 @@
 
 =back
 
+$obj-E<gt>B<nrMessages>(OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"The messages">
+
+=back
+
 $obj-E<gt>B<scanForMessages>(MESSAGE, MESSAGE-IDS, TIMESPAN, WINDOW)
 
 =over 4
@@ -427,12 +396,12 @@
 
 =over 4
 
- Option               Defined in       Default      
- check                L<Mail::Box>     <false>      
- folder               L<Mail::Box>     <required>   
- folderdir            L<Mail::Box>     <from folder>
- skip_empty           L<Mail::Box>     <false>      
- subfolder_extension                   <from object>
+ Option               Defined in       Default              
+ check                L<Mail::Box>     <false>              
+ folder               L<Mail::Box>     <from calling object>
+ folderdir            L<Mail::Box>     <from folder>        
+ skip_empty           L<Mail::Box>     <false>              
+ subfolder_extension                   <from object>        
 
 . check BOOLEAN
 
@@ -453,8 +422,10 @@
 
 =back
 
-$obj-E<gt>B<nameOfSubFolder>(NAME)
+$obj-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
 
+Mail::Box::Mbox-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
+
 =over 4
 
 See L<Mail::Box/"Sub-folders">
@@ -469,7 +440,7 @@
 
 =back
 
-$obj-E<gt>B<openSubFolder>(NAME, OPTIONS)
+$obj-E<gt>B<openSubFolder>(SUBNAME, OPTIONS)
 
 =over 4
 
@@ -477,10 +448,20 @@
 
 =back
 
+$obj-E<gt>B<topFolderWithMessages>
+
+Mail::Box::Mbox-E<gt>B<topFolderWithMessages>
+
+=over 4
+
+See L<Mail::Box/"Sub-folders">
+
+=back
+
 =head2 Internals
 
 
-$obj-E<gt>B<coerce>(MESSAGE)
+$obj-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -488,6 +469,31 @@
 
 =back
 
+$obj-E<gt>B<create>(FOLDERNAME, OPTIONS)
+
+Mail::Box::Mbox-E<gt>B<create>(FOLDERNAME, OPTIONS)
+
+=over 4
+
+ Option               Defined in       Default
+ folderdir            L<Mail::Box>     undef  
+ subfolder_extension                   undef  
+
+. folderdir DIRECTORY
+
+. subfolder_extension STRING
+
+=over 4
+
+If a directory is found on the location of the folder to be created, this
+STRING is used to extend that directory name with.  This will cause the
+directory to be seen as sub-folder for the created folder.  This argument
+is passed to L<folderToFilename()|Mail::Box::Mbox/"Internals">.
+
+=back
+
+=back
+
 $obj-E<gt>B<determineBodyType>(MESSAGE, HEAD)
 
 =over 4
@@ -509,6 +515,28 @@
 
 =back
 
+Mail::Box::Mbox-E<gt>B<foundIn>([FOLDERNAME], [OPTIONS])
+
+=over 4
+
+If no FOLDERNAME is specified, then the value of the C<folder> option
+is taken.  A mbox folder is a file which starts with a separator
+line: a line with C<'From '> as first characters.  Blank lines which
+start the file are ignored, which is not for all MUA's acceptable.
+
+ Option               Defined in       Default      
+ folder                                undef        
+ folderdir            L<Mail::Box>     undef        
+ subfolder_extension                   <from object>
+
+. folder FOLDERNAME
+
+. folderdir DIRECTORY
+
+. subfolder_extension STRING
+
+=back
+
 $obj-E<gt>B<lineSeparator>([STRING|'CR'|'LF'|'CRLF'])
 
 =over 4
@@ -648,9 +676,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Mbox-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Mbox-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -905,7 +933,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Message/Destructed.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Message/Destructed.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Message/Destructed.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Box::Message::Destructed;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Message';
 
 use Carp;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Message/Destructed.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Message/Destructed.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Message/Destructed.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -39,7 +39,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -47,24 +47,6 @@
 
 =back
 
-Mail::Box::Message::Destructed-E<gt>B<coerce>(MESSAGE)
-
-=over 4
-
-Coerce a L<Mail::Box::Message|Mail::Box::Message> into destruction.
-
-I<Example:> of coercion to death
-
-
- Mail::Box::Message::Destructed->coerce($folder->message(1));
- $folder->message(1)->destruct;  # same
-
- my $msg = $folder->message(1);
- Mail::Box::Message::Destructed->coerce($msg);
- $msg->destruct;                 # same
-
-=back
-
 Mail::Box::Message::Destructed-E<gt>B<new>(MESSAGE-ID, OPTIONS)
 
 =over 4
@@ -129,7 +111,7 @@
 
 =back
 
-Mail::Box::Message::Destructed-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Box::Message::Destructed-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -251,22 +233,38 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<copyTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
+$obj-E<gt>B<folder>([FOLDER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<isDummy>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -274,7 +272,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -282,15 +280,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<moveTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<print>([FILEHANDLE])
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -298,15 +304,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<seqnr>([INTEGER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<size>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -314,7 +328,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -322,7 +336,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -590,7 +604,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -606,44 +620,35 @@
 
 =back
 
-=head2 The message
+=head2 Internals
 
 
-$obj-E<gt>B<copyTo>(FOLDER)
+$obj-E<gt>B<clonedFrom>
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<folder>([FOLDER])
+Mail::Box::Message::Destructed-E<gt>B<coerce>(MESSAGE)
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+Coerce a L<Mail::Box::Message|Mail::Box::Message> into destruction.
 
-=back
+I<Example:> of coercion to death
 
-$obj-E<gt>B<moveTo>(FOLDER)
 
-=over 4
+ Mail::Box::Message::Destructed->coerce($folder->message(1));
+ $folder->message(1)->destruct;  # same
 
-See L<Mail::Box::Message/"The message">
+ my $msg = $folder->message(1);
+ Mail::Box::Message::Destructed->coerce($msg);
+ $msg->destruct;                 # same
 
 =back
 
-$obj-E<gt>B<seqnr>([INTEGER])
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-=head2 Internals
-
-
 $obj-E<gt>B<diskDelete>
 
 =over 4
@@ -727,9 +732,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Message::Destructed-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Message::Destructed-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -893,10 +898,18 @@
 
 I<Error:> No default mailer found to send message.
 
-The message L<send()|Mail::Message/"The Message"> mechanism had not enough information to automatically
+The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
 find a mail transfer agent to sent this message.  Specify a mailer
 explicitly using the C<via> options.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Box::Message::Destructed/"METHODS">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -918,6 +931,14 @@
 your program still tries to get to the header or body data after this
 destruction, which is not possible.
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -941,7 +962,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Message.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Message.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Message.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,41 +4,30 @@
 
 package Mail::Box::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message';
 
 use Date::Parse;
 use Scalar::Util 'weaken';
 
 
+#-------------------------------------------
+
+
 sub init($)
 {   my ($self, $args) = @_;
     $self->SUPER::init($args);
 
-    $self->{MBM_body_type}  = $args->{body_type}
-        if exists $args->{body_type};
-
-    $self->{MBM_folder}     = $args->{folder};
+    $self->{MBM_body_type} = $args->{body_type};
+    $self->{MBM_folder}    = $args->{folder};
     weaken($self->{MBM_folder});
 
     return $self if $self->isDummy;
-
     $self;
 }
 
 #-------------------------------------------
 
-
-sub coerce($)
-{   my ($class, $message) = @_;
-    return bless $message, $class
-        if $message->isa(__PACKAGE__);
-
-    $class->SUPER::coerce($message);
-}
-
-#-------------------------------------------
-
 sub head(;$)
 {   my $self  = shift;
     return $self->SUPER::head unless @_;
@@ -88,17 +77,23 @@
 #-------------------------------------------
 
 
-sub copyTo($)
-{   my ($self, $folder) = @_;
-    $folder->addMessage($self->clone);
+sub copyTo($@)
+{   my ($self, $folder) = (shift, shift);
+    my $clone = $self->clone(@_);
+
+    $folder->addMessage($clone);
 }
 
 #-------------------------------------------
 
 
-sub moveTo($)
-{   my ($self, $folder) = @_;
-    my $added = $folder->addMessage($self->clone);
+sub moveTo($@)
+{   my ($self, $folder, %args) = @_;
+
+    $args{share} = 1
+         unless exists $args{share} || exists $args{shallow_body};
+
+    my $added = $folder->copyTo($folder, %args);
     $self->label(deleted => 1);
     $added;
 }
@@ -111,7 +106,7 @@
 
     unless($getbodytype)
     {   my $folder   = $self->{MBM_folder};
-        $getbodytype = sub {$folder->determineBodyType(@_)};
+        $getbodytype = sub {$folder->determineBodyType(@_)} if defined $folder;
     }
 
     $self->SUPER::readBody($parser, $head, $getbodytype);

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Message.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Message.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Message.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -45,7 +45,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -53,17 +53,6 @@
 
 =back
 
-Mail::Box::Message-E<gt>B<coerce>(MESSAGE)
-
-=over 4
-
-Coerce a message to be included in a folder.  The folder itself
-is not specified, but the type of the message is transformed correctly.
-The coerced version of the message is returned.  When no changes had
-to be made, the original message is returned.
-
-=back
-
 Mail::Box::Message-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -147,7 +136,7 @@
 
 =back
 
-Mail::Box::Message-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Box::Message-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -269,22 +258,86 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<copyTo>(FOLDER, OPTIONS)
+
+=over 4
+
+Copy the message to the indicated opened FOLDER, without deleting the
+original.  The coerced message (the clone in the destination folder)
+is returned.
+
+ Option        Defined in       Default
+ shallow                        <false>
+ shallow_body                   <false>
+ shallow_head                   <false>
+ share                          <false>
+
+. shallow BOOLEAN
+
+=over 4
+
+Used for L<clone(shallow)|Mail::Message/"Constructors">.
+
+=back
+
+. shallow_body BOOLEAN
+
+=over 4
+
+Used for L<clone(shallow_body)|Mail::Message/"Constructors">.
+
+=back
+
+. shallow_head BOOLEAN
+
+=over 4
+
+Used for L<clone(shallow_head)|Mail::Message/"Constructors">.
+
+=back
+
+. share BOOLEAN
+
+=over 4
+
+Try to share the physical storage of the message between the two folders.
+Sometimes, they even may be of different types.  When not possible, this
+options will be silently ignored.
+
+=back
+
+I<Example:> 
+
+ my $draft = $mgr->open(folder => 'Draft');
+ $message->copyTo($draft, share => 1);
+
+=back
+
+$obj-E<gt>B<folder>([FOLDER])
+
+=over 4
+
+In with folder did we detect this message/dummy?  This is a reference
+to the folder-object.
+
+=back
+
 $obj-E<gt>B<isDummy>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -292,7 +345,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -300,15 +353,63 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<moveTo>(FOLDER, OPTIONS)
+
+=over 4
+
+Move the message from this folder to the FOLDER specified.  This will
+create a copy using L<clone()|Mail::Message/"Constructors"> first.  Then, this original message is
+flagged to get deleted.  So until the source folder is closed, two copies
+of the message may stay in memory.
+
+The newly created message clone (part of the destination folder)
+is returned.  All OPTIONS are passed to L<copyTo()|Mail::Box::Message/"The message">
+
+ Option        Defined in       Default                          
+ shallow_body                   <undef>                          
+ share                          <true unless shallow_body exists>
+
+. shallow_body BOOLEAN
+
+=over 4
+
+Only create a shallow body, which means that the header can not be
+reused.  A message can therefore not be shared in storage unless
+explicitly stated.
+
+=back
+
+. share BOOLEAN
+
+=over 4
+
+When there is a chance that the original message can be undeleted, then
+this must be set to false.  Otherwise a shallow clone will be made, which
+will share the header which can be modified in the undeleted message.
+
+=back
+
+I<Example:> of moving a message
+
+
+ my $t = $msg->moveTo('trash');
+
+is equivalent to
+
+ my $t = $msg->copyTo('trash', share => 1);
+ $msg->delete;
+
+=back
+
 $obj-E<gt>B<print>([FILEHANDLE])
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -316,15 +417,24 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<seqnr>([INTEGER])
+
+=over 4
+
+Get the number of this message is the current folder.  It starts counting
+from zero.  Do not change the number.
+
+=back
+
 $obj-E<gt>B<size>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -332,7 +442,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -340,7 +450,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -604,7 +714,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -620,57 +730,25 @@
 
 =back
 
-=head2 The message
+=head2 Internals
 
 
-$obj-E<gt>B<copyTo>(FOLDER)
+$obj-E<gt>B<clonedFrom>
 
 =over 4
 
-Copy the message to the indicated opened FOLDER, without deleting the
-original.  The coerced message (the copy in the desitnation folder) is
-returned.
+See L<Mail::Message/"Internals">
 
-I<Example:> 
-
- my $draft = $mgr->open(folder => 'Draft');
- $message->copyTo($draft);
-
 =back
 
-$obj-E<gt>B<folder>([FOLDER])
+Mail::Box::Message-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
-In with folder did we detect this message/dummy?  This is a reference
-to the folder-object.
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<moveTo>(FOLDER)
-
-=over 4
-
-Move the message from this folder to the FOLDER specified.  This will
-create a copy using L<clone()|Mail::Message/"Constructors"> first, and flag this original message
-to be deleted.  So until the source folder is closed, two copies of
-the message stay in memory.  The newly created message (part of the
-destination folder) is returned.
-
-=back
-
-$obj-E<gt>B<seqnr>([INTEGER])
-
-=over 4
-
-Get the number of this message is the current folder.  It starts counting
-from zero.  Do not change the number.
-
-=back
-
-=head2 Internals
-
-
 $obj-E<gt>B<diskDelete>
 
 =over 4
@@ -763,9 +841,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Message-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Message-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -917,10 +995,18 @@
 
 I<Error:> No default mailer found to send message.
 
-The message L<send()|Mail::Message/"The Message"> mechanism had not enough information to automatically
+The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
 find a mail transfer agent to sent this message.  Specify a mailer
 explicitly using the C<via> options.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message/"Internals">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -929,6 +1015,14 @@
 not.  Probably you should investigate this and probably inform the author
 of the package.
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -952,7 +1046,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Net/Message.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Net/Message.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Net/Message.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Box::Net::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Message';
 
 use File::Copy;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Net/Message.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Net/Message.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Net/Message.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -36,7 +36,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -44,14 +44,6 @@
 
 =back
 
-Mail::Box::Net::Message-E<gt>B<coerce>(MESSAGE)
-
-=over 4
-
-See L<Mail::Box::Message/"METHODS">
-
-=back
-
 Mail::Box::Net::Message-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -122,7 +114,7 @@
 
 =back
 
-Mail::Box::Net::Message-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Box::Net::Message-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -244,22 +236,38 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<copyTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
+$obj-E<gt>B<folder>([FOLDER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<isDummy>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -267,7 +275,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -275,15 +283,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<moveTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<print>([FILEHANDLE])
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -291,15 +307,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<seqnr>([INTEGER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<size>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -307,15 +331,25 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<unique>([STRING|undef])
+
+=over 4
+
+Returns the name of the file in which this message is actually stored.  This
+will return C<undef> when the message is not stored in a file.  When a STRING
+is specified, a new identifier is stored first.
+
+=back
+
 $obj-E<gt>B<write>([FILEHANDLE])
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -579,7 +613,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -595,54 +629,25 @@
 
 =back
 
-=head2 The message
+=head2 Internals
 
 
-$obj-E<gt>B<copyTo>(FOLDER)
+$obj-E<gt>B<clonedFrom>
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<folder>([FOLDER])
+Mail::Box::Net::Message-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<moveTo>(FOLDER)
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-$obj-E<gt>B<seqnr>([INTEGER])
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-$obj-E<gt>B<unique>([STRING|undef])
-
-=over 4
-
-Returns the name of the file in which this message is actually stored.  This
-will return C<undef> when the message is not stored in a file.  When a STRING
-is specified, a new identifier is stored first.
-
-=back
-
-=head2 Internals
-
-
 $obj-E<gt>B<diskDelete>
 
 =over 4
@@ -732,9 +737,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Net::Message-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Net::Message-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -883,10 +888,18 @@
 
 I<Error:> No default mailer found to send message.
 
-The message L<send()|Mail::Message/"The Message"> mechanism had not enough information to automatically
+The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
 find a mail transfer agent to sent this message.  Specify a mailer
 explicitly using the C<via> options.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message/"Internals">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -901,6 +914,14 @@
 I<Error:> Unable to read delayed head.
 
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -924,7 +945,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Net.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Net.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Net.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -2,7 +2,7 @@
 use strict;
 package Mail::Box::Net;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 use base 'Mail::Box';
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Net.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Net.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Net.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -71,21 +71,6 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<create>(FOLDER, OPTIONS)
-
-Mail::Box::Net-E<gt>B<create>(FOLDER, OPTIONS)
-
-=over 4
-
-Create a new folder on the remote server.
-
- Option     Defined in    Default   
- folderdir  L<Mail::Box>  <not used>
-
-. folderdir DIRECTORY
-
-=back
-
 Mail::Box::Net-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -211,7 +196,7 @@
 =head2 The folder
 
 
-$obj-E<gt>B<addMessage>(MESSAGE)
+$obj-E<gt>B<addMessage>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -251,7 +236,7 @@
 
 =back
 
-$obj-E<gt>B<delete>
+$obj-E<gt>B<delete>(OPTIONS)
 
 =over 4
 
@@ -268,14 +253,6 @@
 
 =back
 
-Mail::Box::Net-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
-
-=over 4
-
-See L<Mail::Box/"The folder">
-
-=back
-
 $obj-E<gt>B<name>
 
 =over 4
@@ -327,6 +304,14 @@
 =head2 Folder flags
 
 
+$obj-E<gt>B<access>
+
+=over 4
+
+See L<Mail::Box/"Folder flags">
+
+=back
+
 $obj-E<gt>B<isModified>
 
 =over 4
@@ -410,6 +395,14 @@
 
 =back
 
+$obj-E<gt>B<nrMessages>(OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"The messages">
+
+=back
+
 $obj-E<gt>B<scanForMessages>(MESSAGE, MESSAGE-IDS, TIMESPAN, WINDOW)
 
 =over 4
@@ -431,8 +424,10 @@
 
 =back
 
-$obj-E<gt>B<nameOfSubFolder>(NAME)
+$obj-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
 
+Mail::Box::Net-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
+
 =over 4
 
 See L<Mail::Box/"Sub-folders">
@@ -447,7 +442,7 @@
 
 =back
 
-$obj-E<gt>B<openSubFolder>(NAME, OPTIONS)
+$obj-E<gt>B<openSubFolder>(SUBNAME, OPTIONS)
 
 =over 4
 
@@ -455,10 +450,20 @@
 
 =back
 
+$obj-E<gt>B<topFolderWithMessages>
+
+Mail::Box::Net-E<gt>B<topFolderWithMessages>
+
+=over 4
+
+See L<Mail::Box/"Sub-folders">
+
+=back
+
 =head2 Internals
 
 
-$obj-E<gt>B<coerce>(MESSAGE)
+$obj-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -466,6 +471,21 @@
 
 =back
 
+$obj-E<gt>B<create>(FOLDER, OPTIONS)
+
+Mail::Box::Net-E<gt>B<create>(FOLDER, OPTIONS)
+
+=over 4
+
+Create a new folder on the remote server.
+
+ Option     Defined in    Default   
+ folderdir  L<Mail::Box>  <not used>
+
+. folderdir DIRECTORY
+
+=back
+
 $obj-E<gt>B<determineBodyType>(MESSAGE, HEAD)
 
 =over 4
@@ -474,6 +494,14 @@
 
 =back
 
+Mail::Box::Net-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"Internals">
+
+=back
+
 $obj-E<gt>B<lineSeparator>([STRING|'CR'|'LF'|'CRLF'])
 
 =over 4
@@ -586,9 +614,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Net-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Net-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -777,7 +805,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/POP3/Message.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/POP3/Message.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/POP3/Message.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Box::POP3::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Net::Message';
 
 use File::Copy;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/POP3/Message.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/POP3/Message.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/POP3/Message.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -34,7 +34,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -42,14 +42,6 @@
 
 =back
 
-Mail::Box::POP3::Message-E<gt>B<coerce>(MESSAGE)
-
-=over 4
-
-See L<Mail::Box::Message/"METHODS">
-
-=back
-
 Mail::Box::POP3::Message-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -114,7 +106,7 @@
 
 =back
 
-Mail::Box::POP3::Message-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Box::POP3::Message-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -236,22 +228,38 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<copyTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
+$obj-E<gt>B<folder>([FOLDER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<isDummy>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -259,7 +267,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -267,15 +275,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<moveTo>(FOLDER, OPTIONS)
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<print>([FILEHANDLE])
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -283,10 +299,18 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<seqnr>([INTEGER])
+
+=over 4
+
+See L<Mail::Box::Message/"The message">
+
+=back
+
 $obj-E<gt>B<size>
 
 =over 4
@@ -302,15 +326,23 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
+$obj-E<gt>B<unique>([STRING|undef])
+
+=over 4
+
+See L<Mail::Box::Net::Message/"The message">
+
+=back
+
 $obj-E<gt>B<write>([FILEHANDLE])
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -574,7 +606,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -590,52 +622,25 @@
 
 =back
 
-=head2 The message
+=head2 Internals
 
 
-$obj-E<gt>B<copyTo>(FOLDER)
+$obj-E<gt>B<clonedFrom>
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<folder>([FOLDER])
+Mail::Box::POP3::Message-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
-See L<Mail::Box::Message/"The message">
+See L<Mail::Message/"Internals">
 
 =back
 
-$obj-E<gt>B<moveTo>(FOLDER)
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-$obj-E<gt>B<seqnr>([INTEGER])
-
-=over 4
-
-See L<Mail::Box::Message/"The message">
-
-=back
-
-$obj-E<gt>B<unique>([STRING|undef])
-
-=over 4
-
-See L<Mail::Box::Net::Message/"The message">
-
-=back
-
-=head2 Internals
-
-
 $obj-E<gt>B<diskDelete>
 
 =over 4
@@ -727,9 +732,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::POP3::Message-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::POP3::Message-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -878,10 +883,18 @@
 
 I<Error:> No default mailer found to send message.
 
-The message L<send()|Mail::Message/"The Message"> mechanism had not enough information to automatically
+The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
 find a mail transfer agent to sent this message.  Specify a mailer
 explicitly using the C<via> options.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message/"Internals">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -896,6 +909,14 @@
 I<Error:> Unable to read delayed head.
 
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -919,7 +940,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/POP3.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/POP3.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/POP3.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,7 +1,7 @@
 
 package Mail::Box::POP3;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Net';
 
 use strict;
@@ -20,6 +20,7 @@
 {   my ($self, $args) = @_;
 
     $args->{server_port} ||= 110;
+    $args->{folder}      ||= 'inbox';
 
     $self->SUPER::init($args);
 
@@ -76,26 +77,24 @@
 
 #-------------------------------------------
 
-sub close()
+sub close(@)
 {   my $self = shift;
 
-    if(my $pop = delete $self->{MBP_client})
-    {   $pop->disconnect;
-    }
+    $self->SUPER::close(@_);
 
-    $self->SUPER::close;
+    my $pop = delete $self->{MBP_client};
+    $pop->disconnect if defined $pop;
+
+    $self;
 }
 
 #-------------------------------------------
 
 
-sub delete()
+sub delete(@)
 {   my $self = shift;
-    $self->log(NOTICE =>
-        "A POP3 folder cannot be deleted: it will be emptied.");
-
-    $_->label(deleted => 1) foreach $self->messages;
-    $self;
+    $self->log(WARNING => "POP3 folders cannot be deleted.");
+    undef;
 }
 
 #-------------------------------------------
@@ -110,7 +109,11 @@
 
 #-------------------------------------------
 
+sub topFolderWithMessages() { 1 }  # Yes: only top folder
 
+#-------------------------------------------
+
+
 sub update() {shift->notImplemented}
 
 #-------------------------------------------

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/POP3.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/POP3.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/POP3.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -61,22 +61,6 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<create>(FOLDER, OPTIONS)
-
-Mail::Box::POP3-E<gt>B<create>(FOLDER, OPTIONS)
-
-=over 4
-
-It is not possible to create a new folder on a POP3 server.  This method
-will always return C<false>.
-
- Option     Defined in    Default   
- folderdir  L<Mail::Box>  <not used>
-
-. folderdir DIRECTORY
-
-=back
-
 Mail::Box::POP3-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -95,7 +79,7 @@
  extract            L<Mail::Box>     C<10240>                                                        
  field_type         L<Mail::Box>     undef                                                           
  fix_headers        L<Mail::Box>     <false>                                                         
- folder             L<Mail::Box>     C<'/'>                                                          
+ folder             L<Mail::Box>     <not applicable>                                                
  folderdir          L<Mail::Box>     <not used>                                                      
  head_delayed_type  L<Mail::Box>     L<Mail::Message::Head::Delayed|Mail::Message::Head::Delayed>    
  head_type          L<Mail::Box>     L<Mail::Message::Head::Complete|Mail::Message::Head::Complete>  
@@ -225,6 +209,11 @@
 C<undef> is returned, and an error displayed.  However, no complaint is
 given when the MESSAGE is C<undef> itself.
 
+ Option  Defined in    Default   
+ share   L<Mail::Box>  <not used>
+
+. share BOOLEAN
+
 =back
 
 $obj-E<gt>B<addMessages>(MESSAGES)
@@ -260,7 +249,7 @@
 
 =back
 
-$obj-E<gt>B<delete>
+$obj-E<gt>B<delete>(OPTIONS)
 
 =over 4
 
@@ -268,6 +257,11 @@
 is remove all the messages in it... which is the action implemented here.
 A notice is logged about this.
 
+ Option     Defined in    Default   
+ recursive  L<Mail::Box>  <not used>
+
+. recursive BOOLEAN
+
 =back
 
 $obj-E<gt>B<folderdir>([DIRECTORY])
@@ -278,14 +272,6 @@
 
 =back
 
-Mail::Box::POP3-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
-
-=over 4
-
-See L<Mail::Box/"The folder">
-
-=back
-
 $obj-E<gt>B<name>
 
 =over 4
@@ -337,6 +323,14 @@
 =head2 Folder flags
 
 
+$obj-E<gt>B<access>
+
+=over 4
+
+See L<Mail::Box/"Folder flags">
+
+=back
+
 $obj-E<gt>B<isModified>
 
 =over 4
@@ -420,6 +414,14 @@
 
 =back
 
+$obj-E<gt>B<nrMessages>(OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"The messages">
+
+=back
+
 $obj-E<gt>B<scanForMessages>(MESSAGE, MESSAGE-IDS, TIMESPAN, WINDOW)
 
 =over 4
@@ -440,11 +442,11 @@
 The standard POP3 protocol does not support sub-folders, so an
 empty list will be returned in any case.
 
- Option      Defined in       Default      
- check       L<Mail::Box>     <false>      
- folder      L<Mail::Box>     <required>   
- folderdir   L<Mail::Box>     <from folder>
- skip_empty  L<Mail::Box>     <false>      
+ Option      Defined in       Default              
+ check       L<Mail::Box>     <false>              
+ folder      L<Mail::Box>     <from calling object>
+ folderdir   L<Mail::Box>     <from folder>        
+ skip_empty  L<Mail::Box>     <false>              
 
 . check BOOLEAN
 
@@ -456,8 +458,10 @@
 
 =back
 
-$obj-E<gt>B<nameOfSubFolder>(NAME)
+$obj-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
 
+Mail::Box::POP3-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
+
 =over 4
 
 See L<Mail::Box/"Sub-folders">
@@ -482,10 +486,20 @@
 
 =back
 
+$obj-E<gt>B<topFolderWithMessages>
+
+Mail::Box::POP3-E<gt>B<topFolderWithMessages>
+
+=over 4
+
+See L<Mail::Box/"Sub-folders">
+
+=back
+
 =head2 Internals
 
 
-$obj-E<gt>B<coerce>(MESSAGE)
+$obj-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -493,6 +507,22 @@
 
 =back
 
+$obj-E<gt>B<create>(FOLDER, OPTIONS)
+
+Mail::Box::POP3-E<gt>B<create>(FOLDER, OPTIONS)
+
+=over 4
+
+It is not possible to create a new folder on a POP3 server.  This method
+will always return C<false>.
+
+ Option     Defined in    Default   
+ folderdir  L<Mail::Box>  <not used>
+
+. folderdir DIRECTORY
+
+=back
+
 $obj-E<gt>B<determineBodyType>(MESSAGE, HEAD)
 
 =over 4
@@ -501,6 +531,14 @@
 
 =back
 
+Mail::Box::POP3-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
+
+=over 4
+
+See L<Mail::Box/"Internals">
+
+=back
+
 $obj-E<gt>B<getHead>(MESSAGE)
 
 =over 4
@@ -640,9 +678,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::POP3-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::POP3-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -749,12 +787,6 @@
 
 =head1 DIAGNOSTICS
 
-I<Notice:> A POP3 folder cannot be deleted: it will be emptied.
-
-Each user has only one POP3 folder on a server.  This folder is created and
-deleted by the server's administrator only.  A delete can only remove the
-messages in the folder for you.
-
 I<Error:> Cannot create POP3 client for $name.
 
 The connection to the POP3 server cannot be established.  You may see
@@ -818,6 +850,11 @@
 of two messages with the same id.  The warning emerges when the C<@> is
 missing from the string.
 
+I<Warning:> POP3 folders cannot be deleted.
+
+Each user has only one POP3 folder on a server.  This folder is created and
+deleted by the server's administrator only.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -886,7 +923,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Parser/Perl.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Parser/Perl.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Parser/Perl.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Box::Parser::Perl;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Parser';
 
 use Mail::Message::Field;
@@ -154,7 +154,7 @@
     my @seps    = @{$self->{MBPP_separators}};
 
     my $file    = $self->{MBPP_file};
-    my @lines   = ();
+    my $lines   = [];
 
     if(@seps && $self->{MBPP_trusted})
     {   my $sep  = $seps[0];
@@ -171,7 +171,7 @@
                 last;
             }
 
-            push @lines, $line;
+            push @$lines, $line;
         }
     }
     elsif(@seps)
@@ -190,32 +190,31 @@
             }
 
             $line =~ s/\015$//;
-            push @lines, $line;
+            push @$lines, $line;
         }
     }
-    else
-    {   # File without separators.
-        @lines = $file->getlines;
+    else # File without separators.
+    {   $lines = ref $file eq 'Mail::Box::FastScalar' ? $file->getlines : [ $file->getlines ];
     }
 
     my $end = $file->tell;
     if($exp_lines > 0 )
-    {    while(@lines > $exp_lines && $lines[-1] =~ $empty)
-         {   $end -= length $lines[-1];
-             pop @lines;
+    {    while(@$lines > $exp_lines && $lines->[-1] =~ $empty)
+         {   $end -= length $lines->[-1];
+             pop @$lines;
          }
     }
-    elsif(@seps && @lines && $lines[-1] =~ $empty)
+    elsif(@seps && @$lines && $lines->[-1] =~ $empty)
     {   # blank line should be in place before a separator.  Only that
         # line is removed.
-        $end -= length $lines[-1];      
-        pop @lines;
+        $end -= length $lines->[-1];
+        pop @$lines;
     }
 
-    map { s/^\>(\>*From\s)/$1/ } @lines
+    map { s/^\>(\>*From\s)/$1/ } @$lines
         if $self->{MBPP_strip_gt};
 
-    $end, \@lines;
+    $end, $lines;
 }
 
 #------------------------------------------
@@ -261,7 +260,7 @@
     my $begin = $file->tell;
 
     my ($end, $lines) = $self->_read_stripped_lines($exp_chars, $exp_lines);
-    ($begin, $end, @$lines);
+    ($begin, $end, $lines);
 }
 
 #------------------------------------------

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Parser/Perl.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Parser/Perl.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Parser/Perl.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -270,9 +270,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Parser::Perl-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Parser::Perl-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -423,7 +423,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Parser.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Parser.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Parser.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Box::Parser;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 use Carp;
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Parser.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Parser.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Parser.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -363,9 +363,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Parser-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Parser-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -509,7 +509,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Search/Grep.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Search/Grep.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Search/Grep.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,7 +1,7 @@
 
 package Mail::Box::Search::Grep;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Search';
 
 use strict;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Search/Grep.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Search/Grep.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Search/Grep.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -238,9 +238,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Search::Grep-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Search::Grep-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -366,7 +366,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Deleted: packages/libmail-box-perl/trunk/lib/Mail/Box/Search/IMAP.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Search/IMAP.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Search/IMAP.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,22 +0,0 @@
-
-package Mail::Box::Search::IMAP;
-use vars '$VERSION';
-$VERSION = '2.055';
-use base 'Mail::Box::Search';
-
-use strict;
-use warnings;
-
-use Carp;
-
-#-------------------------------------------
-
-
-sub init($)
-{   my ($self, $args) = @_;
-    $self->notImplemented;
-}
-
-#-------------------------------------------
-
-1;

Deleted: packages/libmail-box-perl/trunk/lib/Mail/Box/Search/IMAP.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Search/IMAP.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Search/IMAP.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,286 +0,0 @@
-
-=head1 NAME
-
-Mail::Box::Search::IMAP - select messages within a IMAP folder
-
-
-=head1 INHERITANCE
-
- Mail::Box::Search::IMAP
-   is a Mail::Box::Search
-   is a Mail::Reporter
-
-
-=head1 SYNOPSIS
-
- use Mail::Box::Manager;
- my $mgr    = Mail::Box::Manager->new;
- my $folder = $mgr->open('imap4:Inbox');
-
- my $filter = Mail::Box::Search::IMAP->new
-    (  ...to be defined...
-    );
-
- my @msgs   = $filter->search($folder);
- if($filter->search($message)) {...}
-
-
-=head1 DESCRIPTION
-
-THIS PACKAGES IS NOT IMPLEMENTED YET: it waits for
-L<Mail::Transport::IMAP4|Mail::Transport::IMAP4> to be available.
-
-
-
-=head1 METHODS
-
-
-=head2 Constructors
-
-
-Mail::Box::Search::IMAP-E<gt>B<new>(OPTIONS)
-
-=over 4
-
- Option      Defined in       Default      
- binaries    L<Mail::Box::Search>  <false>      
- decode      L<Mail::Box::Search>  <true>       
- delayed     L<Mail::Box::Search>  <true>       
- deleted     L<Mail::Box::Search>  <false>      
- deliver     L<Mail::Box::Search>  undef        
- in          L<Mail::Box::Search>  C<'BODY'>    
- label       L<Mail::Box::Search>  undef        
- limit       L<Mail::Box::Search>  C<0>         
- log         L<Mail::Reporter>  C<'WARNINGS'>
- logical     L<Mail::Box::Search>  C<'REPLACE'> 
- multiparts  L<Mail::Box::Search>  <true>       
- trace       L<Mail::Reporter>  C<'WARNINGS'>
-
-. binaries BOOLEAN
-
-. decode BOOLEAN
-
-. delayed BOOLEAN
-
-. deleted BOOLEAN
-
-. deliver undef|CODE|'DELETE'
-
-. in 'HEAD'|'BODY'|'MESSAGE'
-
-. label STRING
-
-. limit NUMBER
-
-. log LEVEL
-
-. logical 'REPLACE'|'AND'|'OR'|'NOT'|'AND NOT'|'OR NOT'
-
-. multiparts BOOLEAN
-
-. trace LEVEL
-
-=back
-
-=head2 Searching
-
-
-$obj-E<gt>B<inBody>(PART, BODY)
-
-=over 4
-
-See L<Mail::Box::Search/"Searching">
-
-=back
-
-$obj-E<gt>B<inHead>(PART, HEAD)
-
-=over 4
-
-See L<Mail::Box::Search/"Searching">
-
-=back
-
-$obj-E<gt>B<search>(FOLDER|THREAD|MESSAGE|ARRAY-OF-MESSAGES)
-
-=over 4
-
-See L<Mail::Box::Search/"Searching">
-
-=back
-
-$obj-E<gt>B<searchPart>(PART)
-
-=over 4
-
-See L<Mail::Box::Search/"Searching">
-
-=back
-
-=head2 The Results
-
-
-$obj-E<gt>B<printMatch>([FILEHANDLE], HASH)
-
-=over 4
-
-See L<Mail::Box::Search/"The Results">
-
-=back
-
-=head2 Error handling
-
-
-$obj-E<gt>B<AUTOLOAD>
-
-=over 4
-
-See L<Mail::Reporter/"Error handling">
-
-=back
-
-$obj-E<gt>B<addReport>(OBJECT)
-
-=over 4
-
-See L<Mail::Reporter/"Error handling">
-
-=back
-
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
-
-Mail::Box::Search::IMAP-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
-
-=over 4
-
-See L<Mail::Reporter/"Error handling">
-
-=back
-
-$obj-E<gt>B<errors>
-
-=over 4
-
-See L<Mail::Reporter/"Error handling">
-
-=back
-
-$obj-E<gt>B<log>([LEVEL [,STRINGS]])
-
-Mail::Box::Search::IMAP-E<gt>B<log>([LEVEL [,STRINGS]])
-
-=over 4
-
-See L<Mail::Reporter/"Error handling">
-
-=back
-
-$obj-E<gt>B<logPriority>(LEVEL)
-
-Mail::Box::Search::IMAP-E<gt>B<logPriority>(LEVEL)
-
-=over 4
-
-See L<Mail::Reporter/"Error handling">
-
-=back
-
-$obj-E<gt>B<logSettings>
-
-=over 4
-
-See L<Mail::Reporter/"Error handling">
-
-=back
-
-$obj-E<gt>B<notImplemented>
-
-=over 4
-
-See L<Mail::Reporter/"Error handling">
-
-=back
-
-$obj-E<gt>B<report>([LEVEL])
-
-=over 4
-
-See L<Mail::Reporter/"Error handling">
-
-=back
-
-$obj-E<gt>B<reportAll>([LEVEL])
-
-=over 4
-
-See L<Mail::Reporter/"Error handling">
-
-=back
-
-$obj-E<gt>B<trace>([LEVEL])
-
-=over 4
-
-See L<Mail::Reporter/"Error handling">
-
-=back
-
-$obj-E<gt>B<warnings>
-
-=over 4
-
-See L<Mail::Reporter/"Error handling">
-
-=back
-
-=head2 Cleanup
-
-
-$obj-E<gt>B<DESTROY>
-
-=over 4
-
-See L<Mail::Reporter/"Cleanup">
-
-=back
-
-$obj-E<gt>B<inGlobalDestruction>
-
-=over 4
-
-See L<Mail::Reporter/"Cleanup">
-
-=back
-
-
-
-=head1 DIAGNOSTICS
-
-I<Error:> Package $package does not implement $method.
-
-Fatal error: the specific package (or one of its superclasses) does not
-implement this method where it should. This message means that some other
-related classes do implement this method however the class at hand does
-not.  Probably you should investigate this and probably inform the author
-of the package.
-
-
-
-
-
-
-=head1 REFERENCES
-
-See the MailBox website at L<http://perl.overmeer.net/mailbox/> for more details.
-
-=head1 COPYRIGHTS
-
-Distribution version 2.055.
-Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
-other contributors.
-
-Copyright (c) 2001-2003 by the author(s). All rights reserved.
-This program is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Search/SpamAssassin.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Search/SpamAssassin.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Search/SpamAssassin.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,7 +1,7 @@
 
 package Mail::Box::Search::SpamAssassin;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Box::Search';
 
 use strict;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Search/SpamAssassin.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Search/SpamAssassin.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Search/SpamAssassin.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -226,9 +226,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Search::SpamAssassin-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Search::SpamAssassin-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -354,7 +354,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Search.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Search.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Search.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,7 +1,7 @@
 
 package Mail::Box::Search;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use strict;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Search.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Search.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Search.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -11,8 +11,8 @@
 
  Mail::Box::Search is extended by
    Mail::Box::Search::Grep
-   Mail::Box::Search::IMAP
    Mail::Box::Search::SpamAssassin
+   Mail::Server::IMAP4::Search
 
 
 =head1 SYNOPSIS
@@ -45,7 +45,7 @@
 
 Try to detect spam, using Mail::SpamAssassin.
 
-=item L<Mail::Box::Search::IMAP|Mail::Box::Search::IMAP>
+=item Mail::Box::Search::IMAP
 
 Search an IMAP folder for special interface IMAP folders provide for it.
 UNDER CONSTRUCTION till L<Mail::Transport::IMAP4|Mail::Transport::IMAP4> is complete.
@@ -289,9 +289,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Search-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Search-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -436,7 +436,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Manager.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Manager.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Manager.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -2,7 +2,7 @@
 use strict;
 package Mail::Box::Thread::Manager;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use Carp;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Manager.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Manager.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Manager.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -293,7 +293,7 @@
 
 Get a replacement message to be used in threads.  Be warned that a
 dummy is not a member of any folder, so the program working with
-threads must test with L<Mail::Message::isDummy()|Mail::Message/"The Message"> before trying things only
+threads must test with L<Mail::Message::isDummy()|Mail::Message/"The message"> before trying things only
 available to real messages.
 
 =back
@@ -355,9 +355,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Thread::Manager-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Thread::Manager-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -568,7 +568,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Node.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Node.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Node.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -2,7 +2,7 @@
 use strict;
 package Mail::Box::Thread::Node;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use Carp;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Node.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Node.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Thread/Node.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -402,9 +402,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box::Thread::Node-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box::Thread::Node-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -530,7 +530,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/ARRAY.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/ARRAY.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/ARRAY.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -2,7 +2,7 @@
 use strict;
 package Mail::Box::Tie::ARRAY;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 use Carp;
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/ARRAY.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/ARRAY.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/ARRAY.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -180,7 +180,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/HASH.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/HASH.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/HASH.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -2,7 +2,7 @@
 use strict;
 package Mail::Box::Tie::HASH;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 use Carp;
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/HASH.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/HASH.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Tie/HASH.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -170,7 +170,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Tie.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Tie.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Tie.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,7 +1,7 @@
 
 package Mail::Box::Tie;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 use strict;
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box/Tie.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box/Tie.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box/Tie.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -51,7 +51,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box-Cookbook.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box-Cookbook.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box-Cookbook.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -271,7 +271,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box-Index.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box-Index.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box-Index.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -23,25 +23,10 @@
 <li><strong><a name="general">General</a> sources of information</strong>
   <ul>
   <li>MailBox distribution overview (Mail::Box-Overview)
-      <ul>
-      <li>Introduction
-      <li>The class relations
-      <li>The Manager
-      <li>The Messages
-      <li>The Folder types
-      <li>Various Other Classes
-      </ul>
   <li>MailBox simple recepies (Mail::Box-Cookbook)
-      <ul>
-      <li>The Manager
-      <li>Multi part messages
-      <li>Filter
-      <li>Create a reply
-      <li>Build a message
-      </ul>
   </ul>
 
-<li><strong><a name="messages">Messages</a></strong> (L<Mail::Message|Mail::Message>)
+<li><strong><a name="messages">Messages</a></strong> (L<Mail::Message|Mail::Message>)<br />
       See separate entries on header, body, fields
       and construction in this index below.
   <ul>
@@ -123,16 +108,14 @@
 <li><strong><a name="process">Message processing</a></strong>
   <ul>
   <li>Reading a message (Mail::Message::Construct::Read)
-  <li>Building a message (Mail::Message::Construct::Build)
+  <li>Building a message
+      (Mail::Message::Construct::Build)
   <li>Reply to a message (Mail::Message::Construct::Reply)
   <li>Creating a forward
+      (Mail::Message::Construct::Forward)
   <li>Bounce a message (Mail::Message::Construct::Bounce)
-  <li>Rebuilding a message (Mail::Message::Construct::Rebuild)
-      <ul>
-      <li>General rules
-      <li>Conversion rules
-      <li>Adding your own rules
-      </ul>
+  <li>Rebuilding a message
+      (Mail::Message::Construct::Rebuild)
   <li>Convert messages
       <ul>
       <li>To and from Mail::Internet objects (Mail::Message::Convert::MailInternet)
@@ -150,13 +133,17 @@
 <li><strong><a name="folders">Folders</a></strong> (L<Mail::Box|Mail::Box>)
       See separate section for type specifics below.
   <ul>
+  <li>Folder managers
+      <ul>
+      <li>Managing open folders (Mail::Box::Manager)
+      <li>Managing a user (Mail::Box::Manage::User)
+      </ul>
   <li>Folder types (Mail::Box)
       <ul>
       <li>Different kinds of folders
-      <li>Supported folder types
+      <li>Available folder types
       <li>Folder class implementation
       </ul>
-  <li>The folder manager (Mail::Box::Manager)
   <li>Folder tied as array (Mail::Box::Tie::ARRAY)
       <ul>
       <li>Limitations
@@ -245,6 +232,7 @@
       <li>Reducing the header size
           (Mail::Message::Head::Partial)
       <li>
+      </ul>
   <li>Destructing messages (Mail::Box::Message::Destructed)
   </ul>
 <li><strong>Additional modules</strong>
@@ -281,7 +269,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box-Overview.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box-Overview.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box-Overview.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -319,7 +319,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Box;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use Mail::Box::Message;
@@ -136,7 +136,7 @@
           ( folder   => $self
           , method   => $args->{lock_type}
           , timeout  => $args->{lock_timeout}
-          , wait     => $args->{lock_wait}
+          , expires  => $args->{lock_wait}
           , file     => ($args->{lockfile} || $args->{lock_file})
           );
 
@@ -146,20 +146,12 @@
 #-------------------------------------------
 
 
-sub create($@) {shift->notImplemented}
-
-#-------------------------------------------
-
-
 sub folderdir(;$)
 {   my $self = shift;
     $self->{MB_folderdir} = shift if @_;
     $self->{MB_folderdir};
 }
 
-#-------------------------------------------
-
-
 sub foundIn($@) { shift->notImplemented }
 
 #-------------------------------------------
@@ -212,13 +204,14 @@
 #-------------------------------------------
 
 
-sub addMessage($)
+sub addMessage($@)
 {   my $self    = shift;
     my $message = shift or return $self;
+    my %args    = @_;
 
-    confess <<ERROR if $message->can('folder') && $message->folder;
+    confess <<ERROR if $message->can('folder') && defined $message->folder;
 You cannot add a message which is already part of a folder to a new
-one.  Please use moveMessage or copyMessage.
+one.  Please use moveTo or copyTo.
 ERROR
 
     # Force the message into the right folder-type.
@@ -244,6 +237,10 @@
     $coerced;
 }
 
+#-------------------------------------------
+
+
+
 sub addMessages(@)
 {   my $self = shift;
     map {$self->addMessage($_)} @_;
@@ -267,14 +264,15 @@
        :                            (1, 0);
 
     my $delete = $args{delete_copied} || 0;
+    my $share  = $args{share}         || 0;
 
-    $self->_copy_to($to, $select, $flatten, $recurse, $delete);
+    $self->_copy_to($to, $select, $flatten, $recurse, $delete, $share);
 }
 
 # Interface may change without warning.
 sub _copy_to($@)
 {   my ($self, $to, @options) = @_;
-    my ($select, $flatten, $recurse, $delete) = @options;
+    my ($select, $flatten, $recurse, $delete, $share) = @options;
 
     $self->log(ERROR => "Destination folder $to is not writable."),
         return unless $to->writable;
@@ -285,7 +283,8 @@
         "Copying ". at select." messages from $self to $to.");
 
     foreach my $msg (@select)
-    {   if($msg->copyTo($to)) { $msg->label(deleted => 1) if $delete }
+    {   if($msg->copyTo($to, share => $share))
+             { $msg->label(deleted => 1) if $delete }
         else { $self->log(ERROR => "Copying failed for one message.") }
     }
 
@@ -339,7 +338,8 @@
 
     # Inform manager that the folder is closed.
     my $manager = delete $self->{MB_manager};
-    $manager->close($self) if defined $manager && !$args{close_by_manager};
+    $manager->close($self, close_by_self =>1)
+        if defined $manager && !$args{close_by_manager};
 
     my $write;
     for($args{write} || 'MODIFIED')
@@ -364,15 +364,16 @@
                );
 
     $self->locker->unlock;
-    $self->{MB_messages} = [];    # Boom!
+    $self->{MB_messages} = [];                  # Boom!
     $rc;
 }
 
 #-------------------------------------------
 
 
-sub delete()
-{   my $self = shift;
+sub delete(@)
+{   my ($self, %args) = @_;
+    my $recurse = exists $args{recursive} ? $args{recursive} : 1;
 
     # Extra protection: do not remove read-only folders.
     unless($self->writable)
@@ -382,17 +383,15 @@
     }
 
     # Sub-directories need to be removed first.
-    foreach ($self->listSubFolders)
-    {   my $sub = $self->openRelatedFolder(folder => "$self/$_",access => 'rw');
-        next unless defined $sub;
-        $sub->delete;
+    if($recurse)
+    {   foreach ($self->listSubFolders)
+        {   my $sub = $self->openRelatedFolder
+               (folder => "$self/$_", access => 'd', create => 0);
+            defined $sub && $sub->delete(%args);
+        }
     }
 
-    $_->delete foreach $self->messages;
-
-    $self->{MB_remove_empty} = 1;
-    $self->close(write => 'ALWAYS');
-
+    $self->close(write => 'NEVER');
     $self;
 }
 
@@ -404,13 +403,18 @@
 #-------------------------------------------
 
 
-sub writable()  {shift->{MB_access} =~ /w|a/ }
+sub writable()  {shift->{MB_access} =~ /w|a|d/ }
 sub writeable() {shift->writable}  # compatibility [typo]
 sub readable()  {1}  # compatibility
 
 #-------------------------------------------
 
 
+sub access()    {shift->{MB_access}}
+
+#-------------------------------------------
+
+
 sub modified(;$)
 {   my $self = shift;
     return $self->isModified unless @_;   # compat 2.036
@@ -490,6 +494,8 @@
     }
 
     $self->{MB_msgid}{$msgid} = $message;
+    weaken($self->{MB_msgid}{$msgid});
+    $message;
 }
 
 sub messageID(@) {shift->messageId(@_)} # compatibility
@@ -505,6 +511,10 @@
     {   $msgid = $1;
         $msgid =~ s/\s//gs;
     }
+    else
+    {   # Illegal message-id
+        $msgid =~ s/\s/+/gs;
+    }
 
     $self->scanForMessages(undef, $msgid, 'EVER', 'ALL')
         unless exists $msgids->{$msgid};
@@ -549,6 +559,11 @@
 #-------------------------------------------
 
 
+sub nrMessages(@) { scalar shift->messages(@_) }
+
+#-------------------------------------------
+
+
 sub messageIds()    { map {$_->messageId} shift->messages }
 sub allMessageIds() {shift->messageIds}  # compatibility
 sub allMessageIDs() {shift->messageIds}  # compatibility
@@ -677,14 +692,20 @@
 #-------------------------------------------
 
 
-sub nameOfSubFolder($)
-{   my ($self, $name)= @_;
-    "$self/$name";
+sub nameOfSubFolder($;$)
+{   my ($thing, $name) = (shift, shift);
+    my $parent = @_ ? shift : ref $thing ? $thing->name : undef;
+    defined $parent ? "$parent/$name" : $name;
 }
 
 #-------------------------------------------
 
 
+sub topFolderWithMessages() { 1 }
+
+#-------------------------------------------
+
+
 sub read(@)
 {   my $self = shift;
     $self->{MB_open_time}    = time;
@@ -717,7 +738,7 @@
 {   my ($self, %args) = @_;
 
     unless($args{force} || $self->writable)
-    {   $self->log(ERROR => "Folder $self is opened read-only.\n");
+    {   $self->log(ERROR => "Folder $self is opened read-only.");
         return;
     }
 
@@ -807,15 +828,23 @@
 #-------------------------------------------
 
 
-sub coerce($)
-{   my ($self, $message) = @_;
-    $self->{MB_message_type}->coerce($message);
-}
+sub create($@) {shift->notImplemented}
 
+#-------------------------------------------
 
+
 #-------------------------------------------
 
 
+sub coerce($@)
+{   my ($self, $message) = (shift, shift);
+    my $mmtype = $self->{MB_message_type};
+    $message->isa($mmtype) ? $message : $mmtype->coerce($message, @_);
+}
+
+#-------------------------------------------
+
+
 sub readMessages(@) {shift->notImplemented}
 
 #-------------------------------------------
@@ -870,7 +899,7 @@
         :                $1 * 604800;  # week
     }
     else
-    {   $_[0]->log(ERROR => "Invalid timespan '$_' specified.\n");
+    {   $_[0]->log(ERROR => "Invalid timespan '$_' specified.");
         undef;
     }
 }

Modified: packages/libmail-box-perl/trunk/lib/Mail/Box.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Box.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Box.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -127,29 +127,6 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<create>(FOLDERNAME, OPTIONS)
-
-Mail::Box-E<gt>B<create>(FOLDERNAME, OPTIONS)
-
-=over 4
-
-Create a folder.  If the folder already exists, it will
-be left unchanged.  As options, you may specify:
-
- Option     Defined in  Default
- folderdir              undef  
-
-. folderdir DIRECTORY
-
-=over 4
-
-When the foldername is preceded by a C<=>, the C<folderdir> directory
-will be searched for the named folder.
-
-=back
-
-=back
-
 Mail::Box-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -195,16 +172,27 @@
 
 =over 4
 
-Access-rights to the folder. MODE can be read-only (C<"r">), append (C<"a">),
-and read-write (C<"rw">).  Folders are opened for read-only (C<"r">)
-(which means write-protected) by default!
+Access-rights to the folder.  Folders are opened for read-only (which
 
-These MODEs have no relation to the modes actually used to open the
-folder files within this module.  For instance, if you specify C<"rw">, and
+means write-protected) by default! MODE can be
+
+=over 4
+
+=item C<'r'>: read-only (default)
+
+=item C<'a'>: append
+
+=item C<'rw'>: read-write
+
+=item C<'d'>: delete
+=back
+
+These MODE has no relation to the modes actually used to open the folder
+files within this module.  For instance, if you specify C<"rw">, and
 open the folder, only read permission on the folder-file is required.
 
-Be warned: writing a MBOX folder may create a new file to replace the
-old folder.  The permissions and owner of the file get changed by this.
+Be warned: writing a MBOX folder may create a new file to replace the old
+folder.  The permissions and owner of the file may get changed by this.
 
 =back
 
@@ -272,7 +260,7 @@
 work when access is granted for writing or appending to the folder.
 
 Be careful: you may create a different folder type than you expect unless you
-explicitly specify L<Mail::Box::Manager::open(type)|Mail::Box::Manager/"Manage folders">.
+explicitly specify L<Mail::Box::Manager::open(type)|Mail::Box::Manager/"Manage open folders">.
 
 =back
 
@@ -442,7 +430,7 @@
 
 The type of the locker object.  This may be the full name of a CLASS
 which extends Mail::Box::Locker, or one of the known locker types
-C<DotLock>, C<File>, C<Multi>, C<NFS>, C<POSIX>, or C<NONE>.  If an
+C<DotLock>, C<Flock>, C<Multi>, C<NFS>, C<POSIX>, or C<NONE>.  If an
 ARRAY is specified, then a Multi locker is built which uses the specified
 list.
 
@@ -537,16 +525,10 @@
 =head2 The folder
 
 
-$obj-E<gt>B<addMessage>(MESSAGE)
+$obj-E<gt>B<addMessage>(MESSAGE, OPTIONS)
 
 =over 4
 
-=back
-
-$obj-E<gt>B<addMessages>(MESSAGE [, MESSAGE, ...])
-
-=over 4
-
 Add a message to the folder.  A message is usually a
 L<Mail::Box::Message|Mail::Box::Message> object or a sub-class thereof.  The message
 shall not be in an other folder, when you use this method.
@@ -555,6 +537,26 @@
 
 Messages with id's which already exist in this folder are not added.
 
+ Option  Defined in  Default   
+ share               <not used>
+
+. share BOOLEAN
+
+=over 4
+
+Try to share the physical resource of the current message with the
+indicated message.  It is sometimes possible to share messages between
+different folder types.  When the sharing is not possible, than this
+option is simply ignored.
+
+Sharing the resource is quite dangerous, and only available for a
+limited number of folder types, at the moment only some L<Mail::Box::Dir|Mail::Box::Dir>
+folders; these file-based messages can be hardlinked (on platforms that
+support it).  The link may get broken when one message is modified in one
+of the folders.... but maybe not, depending on the folder types involved.
+
+=back
+
 I<Example:> 
 
  $folder->addMessage($msg);
@@ -562,6 +564,19 @@
 
 =back
 
+$obj-E<gt>B<addMessages>(MESSAGE [, MESSAGE, ...])
+
+=over 4
+
+Adds a set of MESSAGE objects to the open folder at once.  For some folder
+types this may be faster than adding them one at a time.
+
+I<Example:> 
+
+ $folder->addMessages($msg1, $msg2, ...);
+
+=back
+
 Mail::Box-E<gt>B<appendMessages>(OPTIONS)
 
 =over 4
@@ -570,14 +585,16 @@
 Usually, this method is called by the L<Mail::Box::Manager::appendMessage()|Mail::Box::Manager/"Move messages to folders">,
 in which case the correctness of the folder type is checked.
 
-This method takes a list of labeled parameters, which may contain
-any option which can be used when a folder is opened, most importantly
-L<new(folderdir)|Mail::Box/"Constructors">.
+For some folder types it is required to open the folder before it can
+be used for appending.  This can be fast, but this can also be very
+slow (depends on the implementation).  All OPTIONS passed will also be
+used to open the folder, if needed.
 
  Option    Defined in       Default   
  folder                     <required>
  message                    undef     
  messages                   undef     
+ share                      <false>   
 
 . folder FOLDERNAME
 
@@ -601,6 +618,15 @@
 
 =back
 
+. share BOOLEAN
+
+=over 4
+
+Try to share physical storage of the message.  Only available for a
+limited number of folder types, otherwise no-op.
+
+=back
+
 I<Example:> 
 
  my $message = Mail::Message->new(...);
@@ -690,6 +716,7 @@
  Option         Defined in       Default                
  delete_copied                   <false>                
  select                          'ACTIVE'               
+ share                           <not used>             
  subfolders                      <folder type dependent>
 
 . delete_copied BOOLEAN
@@ -711,6 +738,15 @@
 
 =back
 
+. share BOOLEAN
+
+=over 4
+
+Try to share the message between the folders.  Some L<Mail::Box::Dir|Mail::Box::Dir>
+folder types do support it by creating a hardlink (on UNIX/Linux).
+
+=back
+
 . subfolders BOOLEAN|'FLATTEN'|'RECURSE'
 
 =over 4
@@ -736,71 +772,48 @@
 
 =back
 
-$obj-E<gt>B<delete>
+$obj-E<gt>B<delete>(OPTIONS)
 
 =over 4
 
 Remove the specified folder file or folder directory (depending on
 the type of folder) from disk.  Of course, THIS IS DANGEROUS: you "may"
-lose data.
+lose data.  Returns a C<true> value on success.
 
 WARNING: When moving messages from one folder to another, be sure to write the
 destination folder before deleting the source folder.  Otherwise you may lose
 data if the system crashes or if there are software problems.
 
-I<Example:> 
+ Option     Defined in  Default
+ recursive              1      
 
- my $folder = Mail::Box::Mbox->new(folder => 'InBox');
- $folder->delete;
+. recursive BOOLEAN
 
-=back
+I<Example:> removing an open folder
 
-$obj-E<gt>B<folderdir>([DIRECTORY])
 
-=over 4
+ my $folder = Mail::Box::Mbox->new(folder => 'InBox', access => 'rw');
+ ... some other code ...
+ $folder->delete;
 
-Get or set the DIRECTORY which is used to store mail-folders by default.
+I<Example:> removing an closed folder
 
-I<Example:> 
 
- print $folder->folderdir;
- $folder->folderdir("$ENV{HOME}/nsmail");
+ my $folder = Mail::Box::Mbox->new(folder => 'INBOX', access => 'd');
+ $folder->delete;
 
 =back
 
-Mail::Box-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
+$obj-E<gt>B<folderdir>([DIRECTORY])
 
 =over 4
 
-Determine if the specified folder is of the type handled by the
-folder class. This method is extended by each folder sub-type.
+Get or set the DIRECTORY which is used to store mail-folders by default.
 
-The FOLDERNAME specifies the name of the folder, as is specified by the
-application.  You need to specified the C<folder> option when you skip
-this first argument.
-
-OPTIONS is a list of extra information for the request.  Read
-the documentation for each type of folder for type specific options, but
-each folder class will at least support the C<folderdir> option:
-
- Option     Defined in  Default
- folderdir              undef  
-
-. folderdir DIRECTORY
-
-=over 4
-
-The location where the folders of this class are stored by default.  If the
-user specifies a name starting with a C<=>, that indicates that the folder is
-to be found in this default DIRECTORY.
-
-=back
-
 I<Example:> 
 
- Mail::Box::Mbox->foundIn('=markov',
-     folderdir => "$ENV{HOME}/Mail");
- Mail::Box::MH->foundIn(folder => '=markov');
+ print $folder->folderdir;
+ $folder->folderdir("$ENV{HOME}/nsmail");
 
 =back
 
@@ -867,7 +880,7 @@
 =over 4
 
 Represent the folder as a URL (Universal Resource Locator) string.  You may
-pass such a URL as folder name to L<Mail::Box::Manager::open()|Mail::Box::Manager/"Manage folders">.
+pass such a URL as folder name to L<Mail::Box::Manager::open()|Mail::Box::Manager/"Manage open folders">.
 
 I<Example:> 
 
@@ -881,6 +894,14 @@
 =head2 Folder flags
 
 
+$obj-E<gt>B<access>
+
+=over 4
+
+Returns the access mode of the folder, as set by L<new(access)|Mail::Box/"Constructors">
+
+=back
+
 $obj-E<gt>B<isModified>
 
 =over 4
@@ -992,14 +1013,16 @@
 existing message whose message ID is MESSAGE-ID. (The message ID of MESSAGE
 need not match MESSAGE-ID.)
 
+!!WARNING!!: when the message headers are delay-parsed, the message
+might be in the folder but not yet parsed into memory. In this case, use
+L<find()|Mail::Box/"The messages"> instead of C<messageId()> if you really need a thorough search.
+This is especially the case for directory organized folders without
+special indexi, like L<Mail::Box::MH|Mail::Box::MH>.
+
 The MESSAGE-ID may still be in angles, which will be stripped.  In that
 case blanks (which origin from header line folding) are removed too.  Other
 info around the angles will be removed too.
 
-WARNING: when the message headers are delay-parsed, the message might be in
-the folder but not yet parsed into memory. In this case, use L<find()|Mail::Box/"The messages">
-instead of C<messageId()> if you really need a thorough search.
-
 I<Example:> 
 
  my $msg = $folder->messageId('<complex-message.id>');
@@ -1079,6 +1102,15 @@
 
 =back
 
+$obj-E<gt>B<nrMessages>(OPTIONS)
+
+=over 4
+
+Simply calls L<messages()|Mail::Box/"The messages"> in scalar context to return a count instead
+of the messages itself.  Some people seem to understand this better.
+
+=back
+
 $obj-E<gt>B<scanForMessages>(MESSAGE, MESSAGE-IDS, TIMESPAN, WINDOW)
 
 =over 4
@@ -1140,11 +1172,11 @@
 
 For MBOX folders, sub-folders are simulated.
 
- Option      Defined in       Default      
- check                        <false>      
- folder                       <required>   
- folderdir                    <from folder>
- skip_empty                   <false>      
+ Option      Defined in       Default              
+ check                        <false>              
+ folder                       <from calling object>
+ folderdir                    <from folder>        
+ skip_empty                   <false>              
 
 . check BOOLEAN
 
@@ -1186,13 +1218,28 @@
 
 =back
 
-$obj-E<gt>B<nameOfSubFolder>(NAME)
+$obj-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
 
+Mail::Box-E<gt>B<nameOfSubFolder>(SUBNAME, [PARENTNAME])
+
 =over 4
 
 Returns the constructed name of the folder with NAME, which is a
-sub-folder of this current one.
+sub-folder of this current one.  You have either to call this method
+as instance method, or specify a PARENTNAME.
 
+I<Example:> how to get the name of a subfolder
+
+
+ my $sub = Mail::Box::Mbox->nameOfSubfolder('xyz', 'abc');
+ print $sub;                        # abc/xyz
+
+ my $f = Mail::Box::Mbox->new(folder => 'abc');
+ print $f->nameOfSubfolder('xyz');  # abc/xyz
+
+ my $sub = Mail::Box::Mbox->nameOfSubfolder('xyz', undef);
+ print $sub;                        # xyz
+
 =back
 
 $obj-E<gt>B<openRelatedFolder>(OPTIONS)
@@ -1206,7 +1253,7 @@
 
 =back
 
-$obj-E<gt>B<openSubFolder>(NAME, OPTIONS)
+$obj-E<gt>B<openSubFolder>(SUBNAME, OPTIONS)
 
 =over 4
 
@@ -1220,10 +1267,21 @@
 
 =back
 
+$obj-E<gt>B<topFolderWithMessages>
+
+Mail::Box-E<gt>B<topFolderWithMessages>
+
+=over 4
+
+Some folder types can have messages in the top-level folder, some other
+can't.
+
+=back
+
 =head2 Internals
 
 
-$obj-E<gt>B<coerce>(MESSAGE)
+$obj-E<gt>B<coerce>(MESSAGE, OPTIONS)
 
 =over 4
 
@@ -1233,6 +1291,31 @@
 
 =back
 
+$obj-E<gt>B<create>(FOLDERNAME, OPTIONS)
+
+Mail::Box-E<gt>B<create>(FOLDERNAME, OPTIONS)
+
+=over 4
+
+Create a folder.  If the folder already exists, it will be left unchanged.
+The folder is created, but not opened!  If you want to open a file which
+may need to be created, then use L<Mail::Box::Manager::open()|Mail::Box::Manager/"Manage open folders"> with the
+create flag, or L<Mail::Box::new(create)|Mail::Box/"Constructors">.
+
+ Option     Defined in  Default
+ folderdir              undef  
+
+. folderdir DIRECTORY
+
+=over 4
+
+When the foldername is preceded by a C<=>, the C<folderdir> directory
+will be searched for the named folder.
+
+=back
+
+=back
+
 $obj-E<gt>B<determineBodyType>(MESSAGE, HEAD)
 
 =over 4
@@ -1242,6 +1325,42 @@
 
 =back
 
+Mail::Box-E<gt>B<foundIn>([FOLDERNAME], OPTIONS)
+
+=over 4
+
+Determine if the specified folder is of the type handled by the
+folder class. This method is extended by each folder sub-type.
+
+The FOLDERNAME specifies the name of the folder, as is specified by the
+application.  You need to specified the C<folder> option when you skip
+this first argument.
+
+OPTIONS is a list of extra information for the request.  Read
+the documentation for each type of folder for type specific options, but
+each folder class will at least support the C<folderdir> option:
+
+ Option     Defined in  Default
+ folderdir              undef  
+
+. folderdir DIRECTORY
+
+=over 4
+
+The location where the folders of this class are stored by default.  If the
+user specifies a name starting with a C<=>, that indicates that the folder is
+to be found in this default DIRECTORY.
+
+=back
+
+I<Example:> 
+
+ Mail::Box::Mbox->foundIn('=markov',
+     folderdir => "$ENV{HOME}/Mail");
+ Mail::Box::MH->foundIn(folder => '=markov');
+
+=back
+
 $obj-E<gt>B<lineSeparator>([STRING|'CR'|'LF'|'CRLF'])
 
 =over 4
@@ -1446,9 +1565,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Box-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Box-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -1693,7 +1812,7 @@
 
 =back
 
-=head2 Supported folder types
+=head2 Available folder types
 
 =over 4
 
@@ -1707,8 +1826,13 @@
 therefore not by MailBox. Read access is enough to do folder conversions,
 for instance.
 
-=item * L<Mail::Box::IMAP4|Mail::Box::IMAP4> (under development)
+=item * L<Mail::Box::IMAP4|Mail::Box::IMAP4> (partially)
 
+The IMAP protocol is very complex.  Some parts are implemented to
+create (sub-optimal but usable) IMAP clients.  Besides, there are
+also some parts for IMAP servers present.  The most important lacking
+feature is support for encrypted connections.
+
 =item * L<Mail::Box::Maildir|Mail::Box::Maildir>
 
 Maildir folders have a directory for each folder.  A folder directory
@@ -1741,6 +1865,12 @@
 messages can be looked at and removed as if they are on the local
 system.
 
+=item * Mail::Box::Netzwert
+
+The Netzwert folder type is optimized for mailbox handling on a cluster
+of systems with a shared NFS storage.  The code is not released under
+GPL (yet)
+
 =back
 
 Other folder types are on the (long) wishlist to get implemented.  Please,
@@ -1752,11 +1882,12 @@
 instance, a L<Mail::Box::File::Message|Mail::Box::File::Message> relates to a L<Mail::Box::File|Mail::Box::File>
 folder.  The folder types are:
 
- Mail::Box::Mbox    Mail::Box::Maildir  Mail::Box::POP3
- |  Mail::Box::Dbx  |  Mail::Box::MH    |  Mail::Box::IMAP4
- |  |               |  |                |  |
- |  |               |  |                |  |
- Mail::Box::File    Mail::Box::Dir      Mail::Box::Net
+                    Mail::Box::Netzwert
+ Mail::Box::Mbox   | Mail::Box::Maildir Mail::Box::POP3
+ |  Mail::Box::Dbx | | Mail::Box::MH    |  Mail::Box::IMAP4
+ |  |               | | |                 |  |
+ |  |               | | |                 |  |
+ Mail::Box::File   Mail::Box::Dir       Mail::Box::Net
        |                  |                   |
        `--------------.   |   .---------------'
                       |   |   |
@@ -1780,7 +1911,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Construct.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Construct.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Construct.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -5,7 +5,7 @@
 
 package Mail::Message::Body;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 use Carp;
 use Mail::Message::Body::String;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Construct.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Construct.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Construct.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -34,7 +34,7 @@
 
 The message-parts will be coerced into a L<Mail::Message::Part|Mail::Message::Part>, so you
 may attach Mail::Internet or MIME::Entity objects if you want --see
-L<Mail::Message::coerce()|Mail::Message/"Constructors">.  A new body with attached messages is
+L<Mail::Message::coerce()|Mail::Message/"Internals">.  A new body with attached messages is
 returned.
 
 I<Example:> 
@@ -181,7 +181,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Delayed.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Delayed.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Delayed.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Body::Delayed;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use Object::Realize::Later

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Delayed.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Delayed.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Delayed.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -145,7 +145,7 @@
 =head2 Internals
 
 
-$obj-E<gt>B<fileLocation>(BEGIN, END)
+$obj-E<gt>B<fileLocation>([BEGIN, END])
 
 =over 4
 
@@ -190,9 +190,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Body::Delayed-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Body::Delayed-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -318,7 +318,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Encode.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Encode.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Encode.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Message::Body;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use Carp;
@@ -163,8 +163,8 @@
 #------------------------------------------
 
 
-sub dispositionFilename($)
-{   my ($self, $dir) = @_;
+sub dispositionFilename(;$)
+{   my $self = shift;
     my $raw;
 
     my $field;
@@ -180,6 +180,9 @@
              || $field->attribute('name');
     }
 
+    return $raw unless @_;
+
+    my $dir      = shift;
     my $filename = '';
     if(defined $raw)
     {   $filename = basename $raw;
@@ -196,6 +199,7 @@
         }
         $filename = "$unique.$ext";
     }
+
     File::Spec->catfile($dir, $filename);
 }
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Encode.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Encode.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Encode.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -149,13 +149,14 @@
 =head2 About the payload
 
 
-$obj-E<gt>B<dispositionFilename>(DIRECTORY)
+$obj-E<gt>B<dispositionFilename>([DIRECTORY])
 
 =over 4
 
 Returns the name which can be used as filename to store the information
 in the indicated DIRECTORY. To get a filename, various fields are searched
-for C<filename> and C<name> attributes.
+for C<filename> and C<name> attributes.  Without DIRECTORY, the name found
+will be returned.
 
 Only the basename of the found name will be used, for security reasons:
 otherwise, it may be possible to access other directories than the
@@ -236,7 +237,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/File.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/File.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/File.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Body::File;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Body';
 
 use Mail::Box::Parser;
@@ -28,7 +28,7 @@
 
     my $file   = $self->tempFilename;
     unless(open OUT, '>', $file)
-    {   $self->log(ERROR => "Cannot write to temporary body file $file: $!\n");
+    {   $self->log(ERROR => "Cannot write to temporary body file $file: $!");
         return;
     }
 
@@ -50,7 +50,7 @@
     local *OUT;
 
     unless(open OUT, '>', $file)
-    {   $self->log(ERROR => "Cannot write to temporary body file $file: $!\n");
+    {   $self->log(ERROR => "Cannot write to temporary body file $file: $!");
         return;
     }
 
@@ -73,7 +73,7 @@
     local *OUT;
 
     unless(open OUT, '>', $file)
-    {   $self->log(ERROR => "Cannot write to temporary body file $file: $!\n");
+    {   $self->log(ERROR => "Cannot write to temporary body file $file: $!");
         return;
     }
 
@@ -94,7 +94,7 @@
     local *OUT;
 
     unless(open OUT, '>', $file)
-    {   $self->log(ERROR => "Cannot write to $file: $!\n");
+    {   $self->log(ERROR => "Cannot write to $file: $!");
         return;
     }
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/File.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/File.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/File.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -268,7 +268,7 @@
 
 =back
 
-$obj-E<gt>B<dispositionFilename>(DIRECTORY)
+$obj-E<gt>B<dispositionFilename>([DIRECTORY])
 
 =over 4
 
@@ -495,9 +495,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Body::File-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Body::File-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -648,7 +648,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Lines.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Lines.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Lines.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Body::Lines;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Body';
 
 use Mail::Box::Parser;
@@ -31,7 +31,8 @@
 
 sub _data_from_filehandle(@)
 {   my ($self, $fh) = @_;
-    $self->{MMBL_array} = [ $fh->getlines ];
+    $self->{MMBL_array} =
+       ref $fh eq 'Mail::Box::FastScalar' ? $fh->getlines : [ $fh->getlines ];
     $self
 }
 
@@ -120,11 +121,11 @@
 
 sub read($$;$@)
 {   my ($self, $parser, $head, $bodytype) = splice @_, 0, 4;
-    my @lines = $parser->bodyAsList(@_);
-    return undef unless @lines;
+    my ($begin, $end, $lines) = $parser->bodyAsList(@_);
+    $lines or return undef;
 
-    $self->fileLocation(shift @lines, shift @lines);
-    $self->{MMBL_array} = \@lines;
+    $self->fileLocation($begin, $end);
+    $self->{MMBL_array} = $lines;
     $self;
 }
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Lines.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Lines.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Lines.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -269,7 +269,7 @@
 
 =back
 
-$obj-E<gt>B<dispositionFilename>(DIRECTORY)
+$obj-E<gt>B<dispositionFilename>([DIRECTORY])
 
 =over 4
 
@@ -488,9 +488,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Body::Lines-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Body::Lines-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -634,7 +634,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Multipart.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Multipart.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Multipart.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Body::Multipart;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Body';
 
 use Mail::Message::Body::Lines;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Multipart.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Multipart.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Multipart.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -377,7 +377,7 @@
 
 =back
 
-$obj-E<gt>B<dispositionFilename>(DIRECTORY)
+$obj-E<gt>B<dispositionFilename>([DIRECTORY])
 
 =over 4
 
@@ -666,9 +666,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Body::Multipart-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Body::Multipart-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -817,7 +817,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Nested.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Nested.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Nested.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Body::Nested;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Body';
 
 use Mail::Message::Body::Lines;
@@ -36,7 +36,7 @@
 
 #------------------------------------------
 
-sub isBinary() {shift->nested->body->isBinary}
+sub isBinary() { shift->nested->body->isBinary }
 
 #------------------------------------------
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Nested.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Nested.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/Nested.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -295,7 +295,7 @@
 
 =back
 
-$obj-E<gt>B<dispositionFilename>(DIRECTORY)
+$obj-E<gt>B<dispositionFilename>([DIRECTORY])
 
 =over 4
 
@@ -532,9 +532,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Body::Nested-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Body::Nested-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -673,7 +673,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/String.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/String.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/String.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Body::String;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Body';
 
 use Carp;
@@ -36,9 +36,16 @@
 
 sub _data_from_filehandle(@)
 {   my ($self, $fh) = @_;
-    my @lines = $fh->getlines;
-    $self->{MMBS_nrlines} = @lines;
-    $self->{MMBS_scalar}  = join '', @lines;
+    if(ref $fh eq 'Mail::Box::FastScalar')
+    {   my $lines = $fh->getlines;
+        $self->{MMBS_nrlines} = @$lines;
+        $self->{MMBS_scalar}  = join '', @$lines;
+    }
+    else
+    {    my @lines = $fh->getlines;
+         $self->{MMBS_nrlines} = @lines;
+         $self->{MMBS_scalar}  = join '', @lines;
+    }
     $self;
 }
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body/String.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body/String.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body/String.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -270,7 +270,7 @@
 
 =back
 
-$obj-E<gt>B<dispositionFilename>(DIRECTORY)
+$obj-E<gt>B<dispositionFilename>([DIRECTORY])
 
 =over 4
 
@@ -489,9 +489,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Body::String-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Body::String-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -635,7 +635,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Body;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use Mail::Message::Field;
@@ -11,7 +11,8 @@
 use Mail::Message::Body::File;
 
 use Carp;
-use Scalar::Util 'weaken';
+use Scalar::Util     'weaken';
+use File::Basename   'basename';
 
 use MIME::Types;
 my $mime_types = MIME::Types->new;
@@ -93,12 +94,10 @@
       = @$args{ qw/mime_type transfer_encoding disposition charset/ };
 
     if(defined $filename)
-    {   unless(defined $disp)
-        {   $disp = Mail::Message::Field->new
-              ('Content-Disposition' => (-T $filename ? 'inline':'attachment'));
-            (my $abbrev = $filename) =~ s!.*[/\\]!!;
-            $disp->attribute(filename => $abbrev);
-        }
+    {   $disp = Mail::Message::Field->new
+           ('Content-Disposition' => (-T $filename ? 'inline':'attachment')
+           , filename => basename($filename)
+           ) unless defined $disp;
 
         unless(defined $mime)
         {   $mime = $mime_types->mimeTypeOf($filename);
@@ -184,7 +183,7 @@
     elsif($eol eq 'LF')    {s/[\015\012]+$/\012/     foreach @$lines}
     elsif($eol eq 'CRLF')  {s/[\015\012]+$/\015\012/ foreach @$lines}
     else
-    {   carp "Unknown line terminator $eol ignored.";
+    {   $self->log(WARNING => "Unknown line terminator $eol ignored.");
         return $self->eol('NATIVE');
     }
 
@@ -279,6 +278,7 @@
     return $self->{MMB_disposition} if !@_ && $self->{MMB_disposition};
 
     my $disp = defined $_[0] ? shift : 'none';
+
     $self->{MMB_disposition} = ref $disp ? $disp->clone
        : Mail::Message::Field->new('Content-Disposition' => $disp);
 }

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Body.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Body.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Body.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -497,7 +497,7 @@
 
 =back
 
-$obj-E<gt>B<dispositionFilename>(DIRECTORY)
+$obj-E<gt>B<dispositionFilename>([DIRECTORY])
 
 =over 4
 
@@ -856,9 +856,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Body-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Body-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -1088,7 +1088,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Bounce.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Bounce.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Bounce.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,10 +3,11 @@
 
 package Mail::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 use Mail::Message::Head::Complete;
 use Mail::Message::Field;
+use Carp         qw/croak/;
 
 
 sub bounce(@)
@@ -19,19 +20,22 @@
          return $bounce;
     }
 
-    my @rgs    = $head->resentGroups;  # No groups yet, then require Received
+    my @rgs    = $head->resentGroups;
     my $rg     = $rgs[0];
 
     if(defined $rg)
-    {   $rg->delete;     # Remove group to re-add it later: others field order
-        while(@_)        #  in header would be disturbed.
+    {   $rg->delete;     # Remove group to re-add it later: otherwise
+        while(@_)        #   field order in header would be disturbed.
         {   my $field = shift;
             ref $field ? $rg->set($field) : $rg->set($field, shift);
         }
     }
-    else
+    elsif(@_)
     {   $rg = Mail::Message::Head::ResentGroup->new(@_);
     }
+    else
+    {   croak "ERROR: bounce requires To, Cc, or Bcc";
+    }
  
     #
     # Add some nice extra fields.
@@ -46,6 +50,13 @@
     }
 
     $head->addResentGroup($rg);
+
+    #
+    # Flag action to original message
+    #
+
+    $self->label(passed => 1);    # used by some maildir clients
+
     $bounce;
 }
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Bounce.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Bounce.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Bounce.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -62,18 +62,28 @@
 
 
 
+=head1 DIAGNOSTICS
 
+I<Error:> bounce requires To, Cc, or Bcc
 
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
 
 
 
+
+
+
 =head1 REFERENCES
 
 See the MailBox website at L<http://perl.overmeer.net/mailbox/> for more details.
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Build.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Build.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Build.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,33 +3,41 @@
 
 package Mail::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
-use Mail::Message::Head::Complete;
-use Mail::Message::Body::Lines;
-use Mail::Message::Body::Multipart;
-use Mail::Message::Field;
+use Mail::Message::Head::Complete  ();
+use Mail::Message::Body::Lines     ();
+use Mail::Message::Body::Multipart ();
+use Mail::Message::Body::Nested    ();
+use Mail::Message::Field           ();
 
-use Mail::Address;
-use Carp;
-use Scalar::Util 'blessed';
-use IO::Lines;
+use Mail::Address  ();
 
 
 sub build(@)
 {   my $class = shift;
 
+    if($class->isa('Mail::Box::Message'))
+    {   $class->log(ERROR
+           => "Only build() Mail::Message's; they are not in a folder yet"); 
+         return undef;
+    }
+
     my @parts
       = ! ref $_[0] ? ()
       : $_[0]->isa('Mail::Message')       ? shift
       : $_[0]->isa('Mail::Message::Body') ? shift
       :               ();
 
-    my ($head, $type, @headerlines);
+    my ($head, @headerlines);
+    my ($type, $transfenc, $dispose);
     while(@_)
     {   my $key = shift;
         if(ref $key && $key->isa('Mail::Message::Field'))
-        {   if($key->name eq 'content-type') { $type = $key }
+        {   my $name = $key->name;
+               if($name eq 'content-type')              { $type      = $key }
+            elsif($name eq 'content-transfer-encoding') { $transfenc = $key }
+            elsif($name eq 'content-disposition')       { $dispose   = $key }
             else { push @headerlines, $key }
             next;
         }
@@ -48,13 +56,24 @@
         elsif($key eq 'files')
         {   @data = map {Mail::Message::Body->new(file => $_) } @$value }
         elsif($key eq 'attach')
-        {   @data = ref $value eq 'ARRAY' ? @$value : $value }
-        elsif(lc $key eq 'content-type')
-        {   $type = Mail::Message::Field->new($key, $value) }
+        {   foreach my $c (ref $value eq 'ARRAY' ? @$value : $value)
+	    {   push @data, $c->isa('Mail::Message')
+		          ? Mail::Message::Body::Nested->new(nested => $c)
+			  : $c;
+            }
+	}
+        elsif($key =~ m/^content\-(type|transfer\-encoding|disposition)$/i )
+        {   my $k     = lc $1;
+            my $field = Mail::Message::Field->new($key, $value);
+               if($k eq 'type') { $type = $field }
+            elsif($k eq 'disposition' ) { $dispose = $field }
+            else { $transfenc = $field }
+        }
         elsif($key =~ m/^[A-Z]/)
         {   push @headerlines, $key, $value }
         else
-        {   croak "Skipped unknown key $key in build." } 
+        {   $class->log(WARNING => "Skipped unknown key $key in build");
+        }
 
         push @parts, grep {defined $_} @data if @data;
     }
@@ -66,6 +85,8 @@
 
     # Setting the type explicitly, only after the body object is finalized
     $body->type($type) if defined $type;
+    $body->disposition($dispose) if defined $dispose;
+    $body->transferEncoding($transfenc) if defined $transfenc;
 
     $class->buildFromBody($body, $head, @headerlines);
 }
@@ -109,4 +130,7 @@
     $message;
 }
 
+#------------------------------------------
+
+
 1;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Build.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Build.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Build.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -27,11 +27,11 @@
 =head2 Constructing a message
 
 
-Mail::Message-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Message-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
-Simplified message object builder.  In case a MESSAGE is
+Simplified message object builder.  In case a MESSAGE or message PART is
 specified, a new message is created with the same body to start with, but
 new headers.  A BODY may be specified as well.  However, there are more
 ways to add data simply.
@@ -41,13 +41,13 @@
 fields are used for other purposes as listed below.  Each field may be used
 more than once.  Pairs where the value is C<undef> are ignored.
 
-If more than one C<data>, C<file>, and C<attach> is specified, a multi-parted
-message is created.  The C<Content-Type> field is treated separately: to
-set the type of the produced message body after it has been created.  For
-instance, to explicitly state that you wish a C<multipart/alternative>
-in stead of the default C<multipart/mixed>.  If
-you wish to specify the type per datum, you need to start playing with
-L<Mail::Message::Body|Mail::Message::Body> objects yourself.
+If more than one C<data>, C<file>, and C<attach> is specified,
+a multi-parted message is created.  Some C<Content-> fields are
+treated separately: to enforce the content lines of the produced
+message body B<after> it has been created.  For instance, to explicitly
+state that you wish a C<multipart/alternative> in stead of the default
+C<multipart/mixed>.  If you wish to specify the type per datum, you need
+to start playing with L<Mail::Message::Body|Mail::Message::Body> objects yourself.
 
 This C<build> method will use L<buildFromBody()|Mail::Message::Construct::Build/"Constructing a message"> when the body object has
 been constructed.  Together, they produce your message.
@@ -59,14 +59,18 @@
  files                    C<[ ]> 
  head                     undef  
 
-. attach BODY|MESSAGE|ARRAY-OF-BODY
+. attach BODY|PART|MESSAGE|ARRAY
 
 =over 4
 
-One attachment to the message.  Each attachment can be full MESSAGE or a BODY.
+One attachment to the message.  Each attachment can be full MESSAGE, a
+PART, or a BODY.
+Any MESSAGE will get encapsulated into a C<message/rfc822> body.
+You can specify many items (may be of different types) at once.
 
  attach => $folder->message(3)->decoded  # body
  attach => $folder->message(3)           # message
+ attach => [ $msg1, $msg2->part(6), $msg3->body ];
 
 =back
 
@@ -183,18 +187,155 @@
 
 
 
+=head1 DIAGNOSTICS
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
 
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message/"Internals">-d
+into the right message type, adding storage information and the like.
 
 
+=head1 DETAILS
 
+
+=head2 Building a message
+
+
+=head3 Rapid building
+
+Most messages you need to construct are relatively simple.  Therefore,
+this module provides a method to prepare a message with only one method
+call: L<build()|Mail::Message::Construct::Build/"Constructing a message">.
+
+=head3 Compared to MIME::Entity::build()
+
+The C<build> method in MailBox is modelled after the C<build> method
+as provided by MIMETools, but with a few simplifications:
+
+=over 4
+
+=item When a keys starts with a capital, than it is always a header field
+
+=item When a keys is lower-cased, it is always something else
+
+=item You use the real field-names, not abbreviations
+
+=item All field names are accepted
+
+=item You may specify field objects between key-value pairs
+
+=item A lot of facts are auto-detected, like content-type and encoding
+
+=item You can create a multipart at once
+
+=back
+
+Hum, reading the list above... what is equivalent?  L<MIME::Entity> is
+not that simple after all!  Let's look at an example from MIME::Entity's
+manual page:
+
+ ### Create the top-level, and set up the mail headers:
+ $top = MIME::Entity->build(Type     => "multipart/mixed",
+                            From     => 'me at myhost.com',
+                            To       => 'you at yourhost.com',
+                            Subject  => "Hello, nurse!");
+                                                                                
+ ### Attachment #1: a simple text document:
+ $top->attach(Path=>"./testin/short.txt");
+                                                                                
+ ### Attachment #2: a GIF file:
+ $top->attach(Path        => "./docs/mime-sm.gif",
+              Type        => "image/gif",
+              Encoding    => "base64");
+                                                                                
+ ### Attachment #3: text we'll create with text we have on-hand:
+ $top->attach(Data => $contents);
+                                                                                
+The MailBox equivalent could be
+
+ my $msg = Mail::Message->build
+   ( From     => 'me at myhost.com'
+   , To       => 'you at yourhost.com'
+   , Subject  => "Hello, nurse!"
+
+   , file     => "./testin/short.txt"
+   , file     => "./docs/mime-sm.gif"
+   , data     => $contents
+   );
+
+One of the simplifications is that L<MIME::Types|MIME::Types> is used to lookup
+the right content type and optimal transfer encoding.  Good values
+for content-disposition and such are added as well.
+
+=head3 build, starting with nothing
+
+See L<build()|Mail::Message::Construct::Build/"Constructing a message">.
+
+=head3 buildFromBody, body becomes message
+
+See L<buildFromBody()|Mail::Message::Construct::Build/"Constructing a message">.
+
+=head3 The Content-* fields
+
+The various C<Content-*> fields are not as harmless as they look.  For
+instance, the "Content-Type" field will have an effect on the default
+transfer encoding.
+
+When a message is built this way:
+
+ my $msg = Mail::Message->build
+  ( 'Content-Type' => 'video/mpeg3'
+  , 'Content-Transfer-Encoding' => 'base64'
+  , 'Content-Disposition' => 'attachment'
+  , file => '/etc/passwd'
+  );
+
+then first a C<text/plain> body is constructed (MIME::Types does not
+find an extension on the filename so defaults to C<text/plain>), with
+no encoding.  Only when that body is ready, the new type and requested
+encodings are set.  The content of the body will get base64 encoded,
+because it is requested that way.
+
+What basically happens is this:
+
+ my $head = ...other header lines...;
+ my $body = Mail::Message::Body::Lines->new(file => '/etc/passwd');
+ $body->type('video/mpeg3');
+ $body->transferEncoding('base64');
+ $body->diposition('attachment');
+ my $msg  = Mail::Message->buildFromBody($body, $head);
+ 
+A safer way to construct the message is:
+
+ my $body = Mail::Message::Body::Lines->new
+  ( file              => '/etc/passwd'
+  , mime_type         => 'video/mpeg3'
+  , transfer_encoding => 'base64'
+  , disposition       => 'attachment'
+  );
+
+ my $msg  = Mail::Message->buildFromBody
+  ( $body
+  , ...other header lines...
+  );
+
+In the latter program, you will immediately start with a body of
+the right type.
+
+
+
+
+
 =head1 REFERENCES
 
 See the MailBox website at L<http://perl.overmeer.net/mailbox/> for more details.
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Forward.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Forward.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Forward.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 use Mail::Message::Body::Multipart;
 use Mail::Message::Body::Nested;
@@ -90,6 +90,7 @@
 
     # Ready
 
+    $self->label(passed => 1);
     $self->log(PROGRESS => "Forward created from $origid");
     $forward;
 }

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Forward.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Forward.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Forward.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -144,8 +144,7 @@
 
 It is only possible to inline textual messages, therefore binary or
 multi-part messages will always be enclosed as attachment.
-Read the details about this choice in section L</Creating a forward>
-subsection L</Including the original message>.
+Read the details in section L</Creating a forward>..
 
 =back
 
@@ -384,9 +383,6 @@
 
 =head2 Creating a forward
 
-
-=head3 Including the original message
-
 The main difference between L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> and L<forward()|Mail::Message::Construct::Forward/"Constructing a message"> is the reason
 for message processing.  The I<bounce> has no intention to modify the
 content of message: the same information is passed-on to someplace else.
@@ -400,18 +396,20 @@
 
 So: some information comes in, is modified, and than forwarded to someone
 else.  Currently, there are four ways to get the original information
-included:
+included, which are explained in the next sections.
 
-=over 4
+After the creation of the forward, you may want to L<rebuild()|Mail::Message::Construct::Rebuild/"Constructing a message"> the
+message to remove unnecessary complexities.  Of course, that is not
+required.
 
-=item * specify a body
+=head3 forward, specify a body
 
 When you specify L<forward(body)|Mail::Message::Construct::Forward/"Constructing a message">, you have created your own body object to
 be used as content of the forwarded message.  This implies that
 L<forward(include)|Mail::Message::Construct::Forward/"Constructing a message"> is C<'NO'>: no automatic generation of the forwarded
 body.
 
-=item * inline the original
+=head3 forward, inline the original
 
 The L<forward(include)|Mail::Message::Construct::Forward/"Constructing a message"> is set to C<'INLINE'> (the default)
 This is the most complicated situation, but most often used by MUAs:
@@ -427,7 +425,7 @@
 When a binary message is encountered, inlining is impossible.  In that
 case, the message is treated as if C<'ENCAPSULATE'> was requested.
 
-=item * attach the original
+=head3 forward, attach the original
 
 When L<forward(include)|Mail::Message::Construct::Forward/"Constructing a message"> is explicitly set to C<'ATTACH'> the result
 will be a multipart which contains two parts.  The first part will
@@ -454,7 +452,7 @@
      text/plain: content in raw text
      text/html: content as html
 
-=item * encapsulate the original
+=head3 forward, encapsulate the original
 
 When L<forward(include)|Mail::Message::Construct::Forward/"Constructing a message"> is explicitly set to C<'ENCAPSULATE'>, then
 the original message is left in-tact as good as possible.  The lines
@@ -482,23 +480,17 @@
 This is probably the reason why many MUAs use this when the forward
 an original message as attachment.
 
-=back
 
-After the creation of the forward, you may want to L<rebuild()|Mail::Message::Construct::Rebuild/"Constructing a message"> the
-message to remove unnecessary complexities.  Of course, that is not
-required.
 
 
 
-
-
 =head1 REFERENCES
 
 See the MailBox website at L<http://perl.overmeer.net/mailbox/> for more details.
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Read.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Read.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Read.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 use Mail::Box::FastScalar;
 
@@ -38,7 +38,8 @@
         $file     = Mail::Box::FastScalar->new(\$buffer);
     }
     else
-    {   croak "Cannot read from $from";
+    {   $class->log(ERROR => "Cannot read from $from");
+        return undef;
     }
 
     my $strip_status = exists $args{strip_status_fields}

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Read.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Read.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Read.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -109,7 +109,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Rebuild.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Rebuild.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Rebuild.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 use Mail::Message::Head::Complete;
 use Mail::Message::Body::Lines;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Rebuild.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Rebuild.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Rebuild.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -296,7 +296,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Reply.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Reply.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Reply.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 use Mail::Message::Body::Multipart;
 use Mail::Address;
@@ -84,8 +84,14 @@
     {   my $reply = $mainhead->get('reply-to');
         $to       = [ $reply->addresses ] if defined $reply;
     }
-    $to  ||= $self->sender || return;
 
+    unless(defined $to)
+    {   my @from  = $self->from;
+        $to     ||= \@from if @from;
+    }
+
+    defined $to or return;
+
     # Add Cc
     my $cc = $args{Cc};
     if(!defined $cc && $args{group_reply})

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Reply.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Reply.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Reply.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -112,9 +112,9 @@
 =over 4
 
 The destination of your message.  By default taken from the C<Reply-To>
-field in the source message.  If that field is not present, the C<Sender>
-field is taken.  If that field is not present as well, the C<From> line
-is scanned.  If they all fail, C<undef> is returned.
+field in the source message.  If that field is not present as well, the
+C<From> line is scanned.  If they all fail, C<undef> is returned by this
+method: no reply message produced.
 
 =back
 
@@ -304,7 +304,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Text.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Text.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Text.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 use IO::Lines;
 
@@ -41,9 +41,17 @@
 
 sub printStructure(;$$)
 {   my $self    = shift;
-    my $indent  = @_ && !ref $_[-1] && substr($_[-1], -1, 1) eq ' ' ? pop : '';
+
+    my $indent
+      = @_==2                       ? pop
+      : defined $_[0] && !ref $_[0] ? shift
+      :                               '';
+
     my $fh      = @_ ? shift : select;
 
+    my $buffer;   # only filled if filehandle==undef
+    open $fh, '>', \$buffer unless defined $fh;
+
     my $subject = $self->get('Subject') || '';
     $subject    = ": $subject" if length $subject;
 
@@ -61,6 +69,8 @@
       :                      ();
 
     $_->printStructure($fh, $indent.'   ') foreach @parts;
+    $buffer;
 }
     
+
 1;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Text.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Text.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct/Text.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -51,23 +51,29 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
-Print the structure of a message to the selected filehandle.
+Print the structure of a message to the specified FILEHANDLE or the
+selected filehandle.  When explicitly C<undef> is specified as handle,
+then the output will be returned as string.
+
 The message's subject and the types of all composing parts are
 displayed.
 
-INDENT specifies the initial indentation string: it is added in
-front of each line, and SHALL end with a blank, if specified.
+INDENT specifies the initial indentation string: it is added in front
+of each line. The INDENT must contain at least one white-space.
 
 I<Example:> 
 
  my $msg = ...;
  $msg->printStructure(\*OUTPUT);
+
  $msg->printStructure;
 
+ my $struct = $msg->printStructure(undef);
+
  # Possible output for one message:
  multipart/mixed: forwarded message from Pietje Puk (1550 bytes)
     text/plain (164 bytes)
@@ -86,6 +92,7 @@
 
 =back
 
+=head2 Flags
 
 
 
@@ -93,13 +100,15 @@
 
 
 
+
+
 =head1 REFERENCES
 
 See the MailBox website at L<http://perl.overmeer.net/mailbox/> for more details.
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 use Mail::Message::Head::Complete;
 use Mail::Message::Body::Lines;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Construct.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Construct.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Construct.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -46,7 +46,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/Html.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/Html.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/Html.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Convert::Html;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Convert';
 
 use Carp;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/Html.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/Html.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/Html.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -179,9 +179,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Convert::Html-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Convert::Html-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -307,7 +307,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatPS.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatPS.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatPS.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Convert::HtmlFormatPS;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Convert';
 
 use Mail::Message::Body::String;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatPS.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatPS.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatPS.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -94,9 +94,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Convert::HtmlFormatPS-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Convert::HtmlFormatPS-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -222,7 +222,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatText.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatText.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatText.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Convert::HtmlFormatText;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Convert';
 
 use Mail::Message::Body::String;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatText.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatText.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/HtmlFormatText.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -109,9 +109,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Convert::HtmlFormatText-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Convert::HtmlFormatText-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -237,7 +237,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MailInternet.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MailInternet.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MailInternet.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Message::Convert::MailInternet;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Convert';
 
 use Mail::Internet;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MailInternet.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MailInternet.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MailInternet.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -113,9 +113,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Convert::MailInternet-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Convert::MailInternet-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -241,7 +241,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MimeEntity.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MimeEntity.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MimeEntity.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Message::Convert::MimeEntity;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Convert';
 
 use MIME::Entity;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MimeEntity.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MimeEntity.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/MimeEntity.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -121,9 +121,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Convert::MimeEntity-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Convert::MimeEntity-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -252,7 +252,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/TextAutoformat.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/TextAutoformat.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/TextAutoformat.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Convert::TextAutoformat;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Convert';
 
 use Mail::Message::Body::String;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/TextAutoformat.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/TextAutoformat.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Convert/TextAutoformat.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -99,9 +99,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Convert::TextAutoformat-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Convert::TextAutoformat-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -227,7 +227,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Convert.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Convert.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Convert.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Message::Convert;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Convert.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Convert.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Convert.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -138,9 +138,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Convert-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Convert-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -266,7 +266,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Dummy.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Dummy.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Dummy.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Dummy;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message';
 
 use Carp;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Dummy.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Dummy.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Dummy.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -25,7 +25,7 @@
 their place is occupied by a dummy.
 
 Be careful when using modules which may create dummies.  Before trying to
-access the header or body use L<isDummy()|Mail::Message/"The Message"> to check if the message is a
+access the header or body use L<isDummy()|Mail::Message/"The message"> to check if the message is a
 dummy message.
 
 
@@ -36,7 +36,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -44,14 +44,6 @@
 
 =back
 
-Mail::Message::Dummy-E<gt>B<coerce>(MESSAGE)
-
-=over 4
-
-See L<Mail::Message/"Constructors">
-
-=back
-
 Mail::Message::Dummy-E<gt>B<new>(MESSAGE-ID, OPTIONS)
 
 =over 4
@@ -115,7 +107,7 @@
 
 =back
 
-Mail::Message::Dummy-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Message::Dummy-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -237,14 +229,14 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -252,7 +244,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -260,7 +252,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -268,7 +260,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -276,7 +268,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -284,7 +276,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -292,7 +284,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -300,7 +292,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -308,7 +300,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -570,7 +562,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -589,6 +581,22 @@
 =head2 Internals
 
 
+$obj-E<gt>B<clonedFrom>
+
+=over 4
+
+See L<Mail::Message/"Internals">
+
+=back
+
+Mail::Message::Dummy-E<gt>B<coerce>(MESSAGE, OPTIONS)
+
+=over 4
+
+See L<Mail::Message/"Internals">
+
+=back
+
 $obj-E<gt>B<isDelayed>
 
 =over 4
@@ -664,9 +672,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Dummy-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Dummy-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -820,10 +828,18 @@
 
 I<Error:> No default mailer found to send message.
 
-The message L<send()|Mail::Message/"The Message"> mechanism had not enough information to automatically
+The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
 find a mail transfer agent to sent this message.  Specify a mailer
 explicitly using the C<via> options.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message/"Internals">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -837,9 +853,17 @@
 Dummy messages are place-holders in message threads: the thread detected
 the existence of the message, because it found the message-id in a
 Reply-To or References field, however it did not find the header and
-body of the message yet.  Use L<isDummy()|Mail::Message/"The Message"> to check whether the thread
+body of the message yet.  Use L<isDummy()|Mail::Message/"The message"> to check whether the thread
 node returned a dummy or not.
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -863,7 +887,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/AddrGroup.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/AddrGroup.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/AddrGroup.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Field::AddrGroup;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'User::Identity::Collection::Emails';
 
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/AddrGroup.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/AddrGroup.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/AddrGroup.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -63,37 +63,47 @@
 
 =back
 
-=head2 Initiation
+=head2 Constructors
 
 
+$obj-E<gt>B<coerce>(OBJECT)
+
+=over 4
+
+Coerce an OBJECT into a L<Mail::Message::Field::AddrGroup|Mail::Message::Field::AddrGroup>.  Currently,
+you can only coerce L<User::Identity::Collection::Emails|User::Identity::Collection::Emails> (which is
+the base class for this one) into this one.
+
+=back
+
 Mail::Message::Field::AddrGroup-E<gt>B<new>([NAME], OPTIONS)
 
 =over 4
 
-See L<User::Identity::Collection::Emails/"Initiation">
+See L<User::Identity::Collection::Emails/"Constructors">
 
 =back
 
 =head2 Attributes
 
 
-$obj-E<gt>B<addRole>(ROLE| ( [NAME],OPTIONS ) | ARRAY-OF-OPTIONS)
+$obj-E<gt>B<description>
 
 =over 4
 
-See L<User::Identity::Collection/"Attributes">
+See L<User::Identity::Item/"Attributes">
 
 =back
 
-$obj-E<gt>B<description>
+$obj-E<gt>B<itemType>
 
 =over 4
 
-See L<User::Identity::Item/"Attributes">
+See L<User::Identity::Collection/"Attributes">
 
 =back
 
-$obj-E<gt>B<name>
+$obj-E<gt>B<name>([NEWNAME])
 
 =over 4
 
@@ -144,6 +154,14 @@
 
 =back
 
+$obj-E<gt>B<removeCollection>(OBJECT|NAME)
+
+=over 4
+
+See L<User::Identity::Item/"Collections">
+
+=back
+
 $obj-E<gt>B<type>
 
 Mail::Message::Field::AddrGroup-E<gt>B<type>
@@ -162,30 +180,52 @@
 
 =back
 
-=head2 Searching
+=head2 Maintaining roles
 
 
-$obj-E<gt>B<find>(NAME|CODE|undef)
+$obj-E<gt>B<addRole>(ROLE| ( [NAME],OPTIONS ) | ARRAY-OF-OPTIONS)
 
 =over 4
 
-See L<User::Identity::Collection/"Searching">
+See L<User::Identity::Collection/"Maintaining roles">
 
 =back
 
-=head2 Constructors
+$obj-E<gt>B<removeRole>(ROLE|NAME)
 
+=over 4
 
-$obj-E<gt>B<coerce>(OBJECT)
+See L<User::Identity::Collection/"Maintaining roles">
 
+=back
+
+$obj-E<gt>B<renameRole>(ROLE|OLDNAME, NEWNAME)
+
 =over 4
 
-Coerce an OBJECT into a L<Mail::Message::Field::AddrGroup|Mail::Message::Field::AddrGroup>.  Currently,
-you can only coerce L<User::Identity::Collection::Emails|User::Identity::Collection::Emails> (which is
-the base class for this one) into this one.
+See L<User::Identity::Collection/"Maintaining roles">
 
 =back
 
+$obj-E<gt>B<sorted>
+
+=over 4
+
+See L<User::Identity::Collection/"Maintaining roles">
+
+=back
+
+=head2 Searching
+
+
+$obj-E<gt>B<find>(NAME|CODE|undef)
+
+=over 4
+
+See L<User::Identity::Collection/"Searching">
+
+=back
+
 =head2 Addresses
 
 
@@ -194,7 +234,7 @@
 =over 4
 
 Add one e-mail address to the list which is maintained in the group. This
-is a wrapper around L<addRole()|User::Identity::Collection/"Attributes"> adding flexibility on how addresses
+is a wrapper around L<addRole()|User::Identity::Collection/"Maintaining roles"> adding flexibility on how addresses
 are specified.  An ADDRESS can be anything which is acceptable for
 L<Mail::Message::Field::Address::coerce()|Mail::Message::Field::Address/"Constructors"> or a list of options which
 will create such an object.
@@ -256,6 +296,12 @@
 the name of a package, you specified a nickname which was not defined.
 Maybe you forgot the 'require' the package which defines the nickname.
 
+I<Error:> Cannot rename $name into $newname: already exists
+
+
+I<Error:> Cannot rename $name into $newname: doesn't exist
+
+
 I<Error:> Creation of a collection via $class failed.
 
 The $class did compile, but it was not possible to create an object
@@ -287,7 +333,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Address.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Address.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Address.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Field::Address;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Identity';
 
 use Mail::Message::Field::Addresses;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Address.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Address.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Address.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -57,17 +57,6 @@
 =head1 METHODS
 
 
-=head2 Initiation
-
-
-Mail::Message::Field::Address-E<gt>B<new>([NAME], OPTIONS)
-
-=over 4
-
-See L<Mail::Identity/"METHODS">
-
-=back
-
 =head2 Constructors
 
 
@@ -97,6 +86,14 @@
 
 =back
 
+Mail::Message::Field::Address-E<gt>B<new>([NAME], OPTIONS)
+
+=over 4
+
+See L<Mail::Identity/"METHODS">
+
+=back
+
 $obj-E<gt>B<parse>(STRING)
 
 =over 4
@@ -167,7 +164,7 @@
 
 =back
 
-$obj-E<gt>B<name>
+$obj-E<gt>B<name>([NEWNAME])
 
 =over 4
 
@@ -242,6 +239,14 @@
 
 =back
 
+$obj-E<gt>B<removeCollection>(OBJECT|NAME)
+
+=over 4
+
+See L<User::Identity::Item/"Collections">
+
+=back
+
 $obj-E<gt>B<type>
 
 Mail::Message::Field::Address-E<gt>B<type>
@@ -327,7 +332,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Addresses.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Addresses.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Addresses.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Field::Addresses;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Field::Structured';
 
 use Mail::Message::Field::AddrGroup;
@@ -113,15 +113,6 @@
 #------------------------------------------
 
 
-sub addExtra($@)
-{   my $self = shift;
-    $self->log(ERROR => 'No extras in address fields.');
-    $self;
-}
-
-#------------------------------------------
-
-
 sub parse($)
 {   my ($self, $string) = @_;
     my ($group, $email) = ('', undef);
@@ -187,7 +178,6 @@
 
 #------------------------------------------
 
-
 sub produceBody()
 {  my @groups = sort {$a->name cmp $b->name} shift->groups;
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Addresses.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Addresses.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Addresses.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -128,8 +128,8 @@
  Option      Defined in       Default      
  attributes  L<Mail::Message::Field::Structured>  <ignored>    
  charset     L<Mail::Message::Field::Full>  undef        
+ datum       L<Mail::Message::Field::Structured>  C<undef>     
  encoding    L<Mail::Message::Field::Full>  C<'q'>       
- extra       L<Mail::Message::Field::Structured>  <ignored>    
  force       L<Mail::Message::Field::Full>  false        
  language    L<Mail::Message::Field::Full>  undef        
  log         L<Mail::Reporter>  C<'WARNINGS'>
@@ -139,10 +139,10 @@
 
 . charset STRING
 
+. datum STRING
+
 . encoding 'q'|'Q'|'b'|'B'
 
-. extra STRING
-
 . force BOOLEAN
 
 . language STRING
@@ -322,14 +322,6 @@
 
 =back
 
-$obj-E<gt>B<addExtra>(...)
-
-=over 4
-
-Extras are not permitted in address fields.
-
-=back
-
 $obj-E<gt>B<addGroup>(GROUP|OPTIONS)
 
 =over 4
@@ -488,25 +480,6 @@
 
 =back
 
-$obj-E<gt>B<consumeAddress>(STRING, OPTIONS)
-
-=over 4
-
-Try to destilate address information from the STRING.   Returned are
-an address B<object> and the left-over string.  If no address was found,
-the first returned value is C<undef>.
-
-=back
-
-$obj-E<gt>B<consumeDomain>(STRING)
-
-=over 4
-
-Try to get a valid domain representation from STRING.  Returned are the
-domain string as found (or C<undef>) and the rest of the string.
-
-=back
-
 $obj-E<gt>B<decode>(STRING, OPTIONS)
 
 Mail::Message::Field::Addresses-E<gt>B<decode>(STRING, OPTIONS)
@@ -543,15 +516,6 @@
 
 =back
 
-$obj-E<gt>B<produceBody>
-
-=over 4
-
-Produce the text for the field.  This will start with the single addresses,
-and end in the groups.
-
-=back
-
 $obj-E<gt>B<setWrapLength>([LENGTH])
 
 =over 4
@@ -579,6 +543,16 @@
 =head2 Parsing
 
 
+$obj-E<gt>B<consumeAddress>(STRING, OPTIONS)
+
+=over 4
+
+Try to destilate address information from the STRING.   Returned are
+an address B<object> and the left-over string.  If no address was found,
+the first returned value is C<undef>.
+
+=back
+
 $obj-E<gt>B<consumeComment>(STRING)
 
 Mail::Message::Field::Addresses-E<gt>B<consumeComment>(STRING)
@@ -589,6 +563,15 @@
 
 =back
 
+$obj-E<gt>B<consumeDomain>(STRING)
+
+=over 4
+
+Try to get a valid domain representation from STRING.  Returned are the
+domain string as found (or C<undef>) and the rest of the string.
+
+=back
+
 $obj-E<gt>B<consumeDotAtom>(STRING)
 
 =over 4
@@ -607,6 +590,14 @@
 
 =back
 
+$obj-E<gt>B<datum>([VALUE])
+
+=over 4
+
+See L<Mail::Message::Field::Structured/"Parsing">
+
+=back
+
 $obj-E<gt>B<parse>(STRING)
 
 =over 4
@@ -615,6 +606,14 @@
 
 =back
 
+$obj-E<gt>B<produceBody>
+
+=over 4
+
+See L<Mail::Message::Field::Full/"Parsing">
+
+=back
+
 =head2 Error handling
 
 
@@ -634,9 +633,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Field::Addresses-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Field::Addresses-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -777,10 +776,6 @@
 Is is not possible to add attributes to address fields: it is not permitted
 by the RFCs.
 
-I<Error:> No extras in address fields.
-
-It is not permitted to have free-format text parts in address fields.
-
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -803,7 +798,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Attribute.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Attribute.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Attribute.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,9 +3,8 @@
 
 package Mail::Message::Field::Attribute;
 use vars '$VERSION';
-$VERSION = '2.055';
-
-use Mail::Reporter;
+$VERSION = '2.060';
+use base 'Mail::Reporter';
 use 5.007003;
 use Encode ();
 
@@ -14,22 +13,25 @@
 
 sub new($$@)
 {   my ($class, $attr) = (shift, shift);
-    my $value = @_ % 1 == 1 ? shift : undef;
-    my %args  = @_;
+    my $value = @_ % 2 == 1 ? shift : undef;
+    $class->SUPER::new(attr => $attr, value => $value, @_);
+}
 
-    my $name  = $attr =~ m/^(.*?)(?:\*\d+)?\*?\=/ ? $1 : $attr;
-    $class->log(WARNING => "Illegal character in parameter name '$name'.\n")
+sub init($$)
+{   my ($self, $args)  = @_;
+    $self->SUPER::init($args);
+
+    my ($attr, $value, $cont) = @$args{ qw/attr value use_continuations/ };
+
+    my $name  = ($attr =~ m/^(.*?)(?:\*\d+)?\*?\=/ ? $1 : $attr);
+    $self->log(WARNING => "Illegal character in parameter name '$name'.")
         if $name !~ m/^[!#-'*+\-.0-9A-Z^-~]+$/;
 
-    my $self  = bless
-     { MMFF_name    => $name
-     , MMFF_usecont =>
-          (defined $args{use_continuations} ? $args{use_continuations} : 1)
-     }, $class;
+    $self->{MMFF_name}     = $name;
+    $self->{MMFF_usecont}  = defined $cont ? $cont : 1;
+    $self->{MMFF_charset}  = $args->{charset}  if defined $args->{charset};
+    $self->{MMFF_language} = $args->{language} if defined $args->{language};
 
-    $self->{MMFF_charset}  = $args{charset}  if defined $args{charset};
-    $self->{MMFF_language} = $args{language} if defined $args{language};
-
     $self->value($value)       if defined $value;
     $self->addComponent($attr) unless $attr eq $name;
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Attribute.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Attribute.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Attribute.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,12 +4,17 @@
 Mail::Message::Field::Attribute - one attribute of a full field
 
 
+=head1 INHERITANCE
 
+ Mail::Message::Field::Attribute
+   is a Mail::Reporter
+
+
 =head1 SYNOPSIS
 
  my $field    = $msg->head->get('Content-Disposition') or return;
  my $full     = $field->study;   # full understanding in unicode
- my $filename = $full->attribute(filename)             or return;
+ my $filename = $full->attribute('filename')           or return;
 
  print ref $filename;     # this class name
  print $filename;         # the attributes content in utf-8
@@ -58,6 +63,8 @@
  Option             Defined in       Default      
  charset                             C<'us-ascii'>
  language                            undef        
+ log                L<Mail::Reporter>  C<'WARNINGS'>
+ trace              L<Mail::Reporter>  C<'WARNINGS'>
  use_continuations                   <true>       
 
 . charset STRING
@@ -82,6 +89,10 @@
 
 =back
 
+. log LEVEL
+
+. trace LEVEL
+
 . use_continuations BOOLEAN
 
 =over 4
@@ -123,9 +134,7 @@
 
 I<Example:> 
 
- my $param = Mail::Message::Field::Attribute
-               ->new('Content-Type');
-
+ my $param = Mail::Message::Field::Attribute->new;
  $param->addComponent("filename*=iso10646'nl-BE'%Re\47u");
 
 =back
@@ -211,8 +220,129 @@
 This class does not extend L<Mail::Reporter|Mail::Reporter> for obvious performance
 reasons: there is no logging or tracing available.
 
+$obj-E<gt>B<AUTOLOAD>
 
+=over 4
 
+See L<Mail::Reporter/"Error handling">
+
+=back
+
+$obj-E<gt>B<addReport>(OBJECT)
+
+=over 4
+
+See L<Mail::Reporter/"Error handling">
+
+=back
+
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
+
+Mail::Message::Field::Attribute-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
+
+=over 4
+
+See L<Mail::Reporter/"Error handling">
+
+=back
+
+$obj-E<gt>B<errors>
+
+=over 4
+
+See L<Mail::Reporter/"Error handling">
+
+=back
+
+$obj-E<gt>B<log>([LEVEL [,STRINGS]])
+
+Mail::Message::Field::Attribute-E<gt>B<log>([LEVEL [,STRINGS]])
+
+=over 4
+
+See L<Mail::Reporter/"Error handling">
+
+=back
+
+$obj-E<gt>B<logPriority>(LEVEL)
+
+Mail::Message::Field::Attribute-E<gt>B<logPriority>(LEVEL)
+
+=over 4
+
+See L<Mail::Reporter/"Error handling">
+
+=back
+
+$obj-E<gt>B<logSettings>
+
+=over 4
+
+See L<Mail::Reporter/"Error handling">
+
+=back
+
+$obj-E<gt>B<notImplemented>
+
+=over 4
+
+See L<Mail::Reporter/"Error handling">
+
+=back
+
+$obj-E<gt>B<report>([LEVEL])
+
+=over 4
+
+See L<Mail::Reporter/"Error handling">
+
+=back
+
+$obj-E<gt>B<reportAll>([LEVEL])
+
+=over 4
+
+See L<Mail::Reporter/"Error handling">
+
+=back
+
+$obj-E<gt>B<trace>([LEVEL])
+
+=over 4
+
+See L<Mail::Reporter/"Error handling">
+
+=back
+
+$obj-E<gt>B<warnings>
+
+=over 4
+
+See L<Mail::Reporter/"Error handling">
+
+=back
+
+=head2 Cleanup
+
+
+$obj-E<gt>B<DESTROY>
+
+=over 4
+
+See L<Mail::Reporter/"Cleanup">
+
+=back
+
+$obj-E<gt>B<inGlobalDestruction>
+
+=over 4
+
+See L<Mail::Reporter/"Cleanup">
+
+=back
+
+
+
 =head1 DIAGNOSTICS
 
 I<Warning:> Illegal character in parameter name '$name'
@@ -221,6 +351,14 @@
 the RFCs.  You can better change the name into something which is accepted,
 or risk applications to corrupt or ignore the message.
 
+I<Error:> Package $package does not implement $method.
+
+Fatal error: the specific package (or one of its superclasses) does not
+implement this method where it should. This message means that some other
+related classes do implement this method however the class at hand does
+not.  Probably you should investigate this and probably inform the author
+of the package.
+
 I<Error:> Too late to merge: value already changed.
 
 
@@ -235,7 +373,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Fast.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Fast.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Fast.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,12 +3,10 @@
 
 package Mail::Message::Field::Fast;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Field';
 
-use Carp;
 
-
 #------------------------------------------
 #
 # The DATA is stored as:   [ NAME, FOLDED-BODY ]

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Fast.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Fast.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Fast.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -317,6 +317,14 @@
 
 =back
 
+$obj-E<gt>B<attributes>
+
+=over 4
+
+See L<Mail::Message::Field/"Access to the content">
+
+=back
+
 $obj-E<gt>B<comment>([STRING])
 
 =over 4
@@ -436,9 +444,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Field::Fast-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Field::Fast-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -579,7 +587,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Flex.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Flex.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Flex.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Field::Flex;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Field';
 
 use Carp;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Flex.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Flex.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Flex.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -291,6 +291,14 @@
 
 =back
 
+$obj-E<gt>B<attributes>
+
+=over 4
+
+See L<Mail::Message::Field/"Access to the content">
+
+=back
+
 $obj-E<gt>B<comment>([STRING])
 
 =over 4
@@ -410,9 +418,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Field::Flex-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Field::Flex-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -553,7 +561,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Full.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Full.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Full.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,17 +3,19 @@
 
 package Mail::Message::Field::Full;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Field';
 
-use Mail::Message::Field::Attribute;
-
 use utf8;
 use Encode ();
 use MIME::QuotedPrint ();
 use Storable 'dclone';
 
-use Carp;
+use Mail::Message::Field::Structured;
+use Mail::Message::Field::Unstructured;
+use Mail::Message::Field::Addresses;
+use Mail::Message::Field::URIs;
+
 my $atext = q[a-zA-Z0-9!#\$%&'*+\-\/=?^_`{|}~];  # from RFC
 
 
@@ -34,6 +36,8 @@
    $implementation{$_} = 'URIs' foreach
       qw/list-help list-post list-subscribe list-unsubscribe list-archive
          list-owner/;
+   $implementation{$_} = 'Structured' foreach
+      qw/content-disposition content-type/;
 #  $implementation{$_} = 'Date' foreach
 #     qw/date resent-date/;
 }
@@ -57,9 +61,6 @@
     my $myclass = 'Mail::Message::Field::'
                 . ($implementation{lc $name} || 'Unstructured');
 
-    eval "require $myclass";
-    return if $@;
-
     $myclass->SUPER::new(%args, name => $name, body => $body);
 }
 
@@ -85,13 +86,6 @@
 
 #------------------------------------------
 
-sub length()
-{   my $self = shift;
-    croak;
-}
-
-#------------------------------------------
-
 sub name() { lc shift->{MMFF_name}}
 
 #------------------------------------------
@@ -116,7 +110,7 @@
 {   my ($self, $body) = (shift, shift);
 
     if(defined $body)
-    {    $self->foldedBody($self->fold($self->{MMFF_name}, $body));
+    {    $self->foldedBody(scalar $self->fold($self->{MMFF_name}, $body));
          return $body;
     }
 
@@ -384,6 +378,11 @@
 
 #------------------------------------------
 
+                                                                                
+sub produceBody() { die }
 
+#------------------------------------------
 
+
+
 1;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Full.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Full.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Full.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -17,11 +17,9 @@
 
 =head1 SYNOPSIS
 
- !!
  !! UNDER CONSTRUCTION
  !! The details of this module are NOT FINISHED yet
- !! Some parts are already usable, however.  With care!
- !!
+ !! Most parts are already usable, however.  With care!
 
  # Getting to understand the complexity of a header field ...
 
@@ -407,6 +405,14 @@
 
 =back
 
+$obj-E<gt>B<attributes>
+
+=over 4
+
+See L<Mail::Message::Field/"Access to the content">
+
+=back
+
 $obj-E<gt>B<beautify>
 
 =over 4
@@ -694,10 +700,24 @@
 
 Get the detailed information from the STRING, and store the data found
 in the field object.  The accepted input is very field type dependent.
-Unstructured fields even do no parsing whatsoever.
+Unstructured fields do no parsing whatsoever.
 
 =back
 
+$obj-E<gt>B<produceBody>
+
+=over 4
+
+Produce the text for the field, based on the information stored within the
+field object.
+
+Usually, you wish the exact same line as was found in the input source
+of a message.  But when you have created a field yourself, it should get
+formatted.  You may call L<beautify()|Mail::Message::Field::Full/"Access to the content"> on a preformatted field to enforce
+a call to this method when the field is needed later.
+
+=back
+
 =head2 Error handling
 
 
@@ -717,9 +737,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Field::Full-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Field::Full-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -877,7 +897,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Structured.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Structured.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Structured.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Field::Structured;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Field::Full';
 
 use Mail::Message::Field::Attribute;
@@ -11,11 +11,12 @@
 
 sub init($)
 {   my ($self, $args) = @_;
+    $self->{MMFS_attrs} = {};
 
     $self->SUPER::init($args);
 
-    $self->addExtra($args->{extra})
-        if exists $args->{extra};
+    $self->datum($args->{datum})
+        if defined $args->{datum};
 
     my $attr = $args->{attributes} || [];
     $attr    = [ %$attr ] if ref $attr eq 'HASH';
@@ -26,8 +27,6 @@
         else          { $self->attribute($name, shift @$attr) }
     }
 
-    $self->{MMFS_attrs} = {};
-    $self->{MMFS_extra} = ();
     $self;
 }
 
@@ -70,4 +69,57 @@
 
 #------------------------------------------
 
+
+sub parse($)
+{   my ($self, $string) = @_;
+    my $datum = '';
+    while(length $string && substr($string, 0, 1) ne ';')
+    {   (undef, $string)  = $self->consumeComment($string);
+        $datum .= $1 if $string =~ s/^([^;(]+)//;
+    }
+    $self->datum($datum);
+
+    my $found = '';
+    while($string =~ m/\S/)
+    {   if($string =~ s/^\s*\;\s*// && length $found)
+        {   my $attr = Mail::Message::Field::Attribute->new($found);
+            $self->attribute($attr);
+            $found = '';
+        }
+
+        (undef, $string) = $self->consumeComment($string);
+        $string =~ s/^\n//;
+        (my $text, $string) = $self->consumePhrase($string);
+        $found .= $text if defined $text;
+    }
+
+    if(length $found)
+    {   my $attr = Mail::Message::Field::Attribute->new($found);
+        $self->attribute($attr);
+    }
+
+    1;
+}
+
+#------------------------------------------
+
+sub produceBody()
+{   my $self  = shift;
+    my $attrs = $self->{MMFS_attrs};
+    my $datum = $self->datum;
+
+    join '; '
+       , (defined $datum ? $datum : '')
+       , map {$_->string} @{$attrs}{sort keys %$attrs};
+}
+
+#------------------------------------------
+
+
+sub datum(;$)
+{   my $self = shift;
+    @_ ? ($self->{MMFS_datum} = shift) : $self->{MMFS_datum};
+}
+*body = \&datum;
+
 1;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Structured.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Structured.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Structured.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -20,8 +20,6 @@
 
  my $f = Mail::Message::Field::Full
             ->new('Content-Type' => 'text/html');
- # $f is now a Mail::Message::Field::Structured
- # NOT READY YET!!!
 
  my @encode = (charset => 'jp', use_continuations => 1);
  $f->attribute('filename=passwd');
@@ -136,8 +134,8 @@
  Option      Defined in       Default      
  attributes                   C<[]>        
  charset     L<Mail::Message::Field::Full>  undef        
+ datum                        C<undef>     
  encoding    L<Mail::Message::Field::Full>  C<'q'>       
- extra                        undef        
  force       L<Mail::Message::Field::Full>  false        
  language    L<Mail::Message::Field::Full>  undef        
  log         L<Mail::Reporter>  C<'WARNINGS'>
@@ -156,16 +154,23 @@
 
 . charset STRING
 
-. encoding 'q'|'Q'|'b'|'B'
+. datum STRING
 
-. extra STRING
-
 =over 4
 
-Text which is appended after the line (preceded by a semicolon).
+The method name I<body> is very confusing, even in the RFC.  In MailBox,
+for historical reasons, L<body()|Mail::Message::Field/"Access to the body"> returns the past of the field contents
+before the first semi-colon.  L<foldedBody()|Mail::Message::Field/"Access to the body"> and L<unfoldedBody()|Mail::Message::Field/"Access to the body">
+address the whole field.
 
+There is no common name for the piece of data before the parameters
+(attributes) in the field-content mentioned in the RFCs, so let's call
+it B<datum>.
+
 =back
 
+. encoding 'q'|'Q'|'b'|'B'
+
 . force BOOLEAN
 
 . language STRING
@@ -556,6 +561,14 @@
 
 =back
 
+$obj-E<gt>B<datum>([VALUE])
+
+=over 4
+
+Equivalent to L<body()|Mail::Message::Field/"Access to the body">, but maybe less confusing.
+
+=back
+
 $obj-E<gt>B<parse>(STRING)
 
 =over 4
@@ -564,6 +577,14 @@
 
 =back
 
+$obj-E<gt>B<produceBody>
+
+=over 4
+
+See L<Mail::Message::Field::Full/"Parsing">
+
+=back
+
 =head2 Error handling
 
 
@@ -583,9 +604,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Field::Structured-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Field::Structured-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -743,7 +764,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/URIs.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/URIs.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/URIs.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,9 +1,8 @@
-use strict;
 use warnings;
 
 package Mail::Message::Field::URIs;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Field::Structured';
 use Carp 'confess';
 
@@ -77,13 +76,4 @@
 #------------------------------------------
 
 
-sub addExtra($@)
-{   my $self = shift;
-    $self->log(ERROR => 'No extras in URI fields.');
-    $self;
-}
-
-#------------------------------------------
-
-
 1;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/URIs.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/URIs.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/URIs.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -114,8 +114,8 @@
  Option      Defined in       Default      
  attributes  L<Mail::Message::Field::Structured>  <ignored>    
  charset     L<Mail::Message::Field::Full>  undef        
+ datum       L<Mail::Message::Field::Structured>  C<undef>     
  encoding    L<Mail::Message::Field::Full>  C<'q'>       
- extra       L<Mail::Message::Field::Structured>  <ignored>    
  force       L<Mail::Message::Field::Full>  false        
  language    L<Mail::Message::Field::Full>  undef        
  log         L<Mail::Reporter>  C<'WARNINGS'>
@@ -125,10 +125,10 @@
 
 . charset STRING
 
+. datum STRING
+
 . encoding 'q'|'Q'|'b'|'B'
 
-. extra STRING
-
 . force BOOLEAN
 
 . language STRING
@@ -312,14 +312,6 @@
 
 =back
 
-$obj-E<gt>B<addExtra>(...)
-
-=over 4
-
-Extras are not permitted in URI fields.
-
-=back
-
 $obj-E<gt>B<addURI>(URI)
 
 =over 4
@@ -542,6 +534,14 @@
 
 =back
 
+$obj-E<gt>B<datum>([VALUE])
+
+=over 4
+
+See L<Mail::Message::Field::Structured/"Parsing">
+
+=back
+
 $obj-E<gt>B<parse>(STRING)
 
 =over 4
@@ -550,6 +550,14 @@
 
 =back
 
+$obj-E<gt>B<produceBody>
+
+=over 4
+
+See L<Mail::Message::Field::Full/"Parsing">
+
+=back
+
 =head2 Error handling
 
 
@@ -569,9 +577,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Field::URIs-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Field::URIs-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -712,10 +720,6 @@
 Is is not possible to add attributes to URI fields: it is not permitted
 by the RFCs.
 
-I<Error:> No extras in URI fields.
-
-It is not permitted to have free-format text parts in URI fields.
-
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -738,7 +742,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Unstructured.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Unstructured.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Unstructured.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,13 +3,17 @@
 
 package Mail::Message::Field::Unstructured;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Field::Full';
 
 
 sub init($)
 {   my ($self, $args) = @_;
 
+    if($args->{body} && ($args->{encoding} || $args->{charset}))
+    {   $args->{body} = $self->encode($args->{body}, %$args);
+    }
+
     $self->SUPER::init($args) or return;
 
     $self->log(WARNING=>"Attributes are not supported for unstructured fields")
@@ -24,4 +28,6 @@
 #------------------------------------------
 
 
+
+
 1;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Unstructured.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Unstructured.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field/Unstructured.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -306,6 +306,14 @@
 
 =back
 
+$obj-E<gt>B<attributes>
+
+=over 4
+
+See L<Mail::Message::Field/"Access to the content">
+
+=back
+
 $obj-E<gt>B<beautify>
 
 =over 4
@@ -491,6 +499,14 @@
 
 =back
 
+$obj-E<gt>B<produceBody>
+
+=over 4
+
+See L<Mail::Message::Field::Full/"Parsing">
+
+=back
+
 =head2 Error handling
 
 
@@ -510,9 +526,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Field::Unstructured-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Field::Unstructured-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -670,7 +686,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Field;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use Carp;
@@ -40,6 +40,8 @@
 #------------------------------------------
 
 
+sub length { length shift->folded }
+
 #------------------------------------------
 
 
@@ -49,7 +51,7 @@
      Resent-Date Resent-From Resent-Sender Resent-To Return-Path
      List-Help List-Post List-Unsubscribe Mailing-List
      Received References Message-ID In-Reply-To
-     Content-Length Content-Type
+     Content-Length Content-Type Content-Disposition
      Delivered-To
      Lines
      MIME-Version
@@ -74,7 +76,7 @@
 #------------------------------------------
 
 
-sub toString(;$) {my $self = shift;$self->string(@_)}
+sub toString(;$) {shift->string(@_)}
 sub string(;$)
 {   my $self  = shift;
     return $self->folded unless @_;
@@ -105,7 +107,7 @@
 #------------------------------------------
 
 
-sub size() {length shift->toString}
+*size = \&length;
 
 #------------------------------------------
 
@@ -119,7 +121,7 @@
 
 my %wf_lookup
   = qw/mime MIME  ldap LDAP  soap SOAP  swe SWE
-       bcc Bcc  cc Cc/;
+       bcc Bcc  cc Cc  id ID/;
 
 sub wellformedName(;$)
 {   my $thing = shift;
@@ -127,12 +129,14 @@
 
     join '-',
        map { $wf_lookup{lc $_} || ( /[aeiouyAEIOUY]/ ? ucfirst lc : uc ) }
-          split /\-/, $name;
+          split /\-/, $name, -1;
 }
 
 #------------------------------------------
 
 
+sub folded { shift->notImplemented }
+
 #------------------------------------------
 
 
@@ -148,6 +152,8 @@
 #------------------------------------------
 
 
+sub foldedBody { shift->notImplemented }
+
 #------------------------------------------
 
 
@@ -171,7 +177,7 @@
     while(@s)
     {   my $s = shift @s;
 
-           if(length $r && substr($r, -1) eq "\\") { $r .= $s } # esc'd special
+           if(CORE::length($r)&& substr($r, -1) eq "\\")  { $r .= $s }
         elsif($s eq '"')   { $in_dquotes = not $in_dquotes; $r .= $s }
         elsif($s eq '(' && !$in_dquotes) { $open_paren++ }
         elsif($s eq ')' && !$in_dquotes) { $open_paren-- }
@@ -201,7 +207,7 @@
     if(@_)
     {   my $comment = shift;
         $body    =~ s/\s*\;.*//;
-        $body   .= "; $comment" if defined $comment && length $comment;
+        $body   .= "; $comment" if defined $comment && CORE::length($comment);
         $self->unfoldedBody($body);
         return $comment;
     }
@@ -225,7 +231,7 @@
            $body =~ m/\b$attr\s*\=\s*
                        ( "( (?: [^"]|\\" )* )"
                        | '( (?: [^']|\\' )* )'
-                       | (\S*)
+                       | ([^;\s]*)
                        )
                   /xi ? $+ : undef;
     }
@@ -235,7 +241,7 @@
     {   for($body)
         {      s/\b$attr\s*=\s*'([^']|\\')*'//i
             or s/\b$attr\s*=\s*"([^"]|\\")*"//i
-            or s/\b$attr\s*=\s*\S*//i;
+            or s/\b$attr\s*=\s*[;\s]*//i;
         }
         $self->unfoldedBody($body);
         return undef;
@@ -245,7 +251,7 @@
     for($body)
     {       s/\b$attr\s*=\s*'([^']|\\')*'/$attr="$quoted"/i
          or s/\b$attr\s*=\s*"([^"]|\\")*"/$attr="$quoted"/i
-         or s/\b$attr\s*=\s*\S+/$attr="$quoted"/i
+         or s/\b$attr\s*=\s*[^;\s]+/$attr="$quoted"/i
          or do { $_ .= qq(; $attr="$quoted") }
     }
 
@@ -256,6 +262,26 @@
 #------------------------------------------
 
 
+sub attributes()
+{   my $self  = shift;
+    my $body  = $self->unfoldedBody;
+
+    my @attrs;
+    while($body =~ m/\b(\w+)\s*\=\s*
+                       ( "( (?: [^"]|\\" )* )"
+                       | '( (?: [^']|\\' )* )'
+                       | ([^;\s]*)
+                       )
+                    /xig)
+    {   push @attrs, $1 => $+;
+    }
+
+    @attrs;
+}
+
+#------------------------------------------
+
+
 sub toInt()
 {   my $self = shift;
     return $1 if $self->body =~ m/^\s*(\d+)\s*$/;
@@ -278,7 +304,7 @@
     my $time   = strftime($format, @time);
 
     # for C libs which do not (GNU compliantly) support %z
-    $time =~ s/ (\%z|[A-Z]+)$/_tz_offset($1)/e;
+    $time =~ s/ (\%z|[A-Z ]+)$/_tz_offset($1)/e;
 
     $time; 
 }
@@ -289,7 +315,7 @@
 
    my $diff = $zone eq '%z' ? Time::Zone::tz_local_offset()
            :                  Time::Zone::tz_offset($zone);
-   my $minutes = int((abs($diff)+0.01) / 60);     # float rounding errors :(
+   my $minutes = int((abs($diff)+0.01) / 60);     # float rounding errors
    my $hours   = int(($minutes+0.01) / 60);
    $minutes   -= $hours * 60;
    sprintf( ($diff < 0 ? " -%02d%02d" : " +%02d%02d"), $hours, $minutes);
@@ -354,7 +380,7 @@
         $body =~ s/[\012\015]+/\n/g;
         $body =~ s/^[ \t]*/ /;  # start with one blank, folding kept unchanged
 
-        $self->log(NOTICE => "Empty field: $name\n")
+        $self->log(NOTICE => "Empty field: $name")
            if $body eq " \n";
     }
 
@@ -398,8 +424,8 @@
 sub setWrapLength(;$)
 {   my $self = shift;
 
-    $self->[1] = $self->fold($self->[0],$self->unfoldedBody, @_)
-        if @_ || $self->[1] !~ m/\n$/;
+    $self->foldedBody(scalar $self->fold($self->Name, $self->unfoldedBody, @_))
+        if @_;
 
     $self;
 }
@@ -422,13 +448,13 @@
     my $wrap  = shift || $default_wrap_length;
 
     $line    =~ s/\n\s/ /gms;            # Remove accidental folding
-    return " \n" unless length $line;    # empty field
+    return " \n" unless CORE::length($line);  # empty field
 
     my @folded;
     while(1)
-    {  my $max = $wrap - (@folded ? 1 : length($name) + 2);
+    {  my $max = $wrap - (@folded ? 1 : CORE::length($name) + 2);
        my $min = $max >> 2;
-       last if length $line < $max;
+       last if CORE::length($line) < $max;
 
           $line =~ s/^ ( .{$min,$max}   # $max to 30 chars
                         [;,]            # followed at a ; or ,
@@ -445,7 +471,7 @@
        push @folded, " $1\n";
     }
 
-    push @folded, " $line\n" if length $line;
+    push @folded, " $line\n" if CORE::length($line);
     wantarray ? @folded : join('', @folded);
 }
 
@@ -455,7 +481,7 @@
 sub unfold($)
 {   my $string = $_[1];
     for($string)
-    {   s/\n//g;
+    {   s/\r?\n//gm;
         s/^ +//;
     }
     $string;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Field.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Field.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Field.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -201,7 +201,8 @@
 
 =over 4
 
-Returns the number of bytes needed to display this header-line.
+Returns the number of bytes needed to display this header-line, Same
+as L<length()|Mail::Message::Field/"The field">.
 
 =back
 
@@ -278,7 +279,7 @@
 
 Returns the body of the field.  When this field is structured, it will
 be B<stripped> from everything what is behind the first semi-color (C<;>).
-In aby case, the string is unfolded.  
+In any case, the string is unfolded.  
 Whether the field is structured is defined by L<isStructured()|Mail::Message::Field/"The field">.
 
 =back
@@ -376,7 +377,7 @@
 Get the value of an attribute, optionally after setting it to a new value.
 Attributes are part of some header lines, and hide themselves in the
 comment field.  If the attribute does not exist, then C<undef> is
-returned.
+returned.  The attribute is still encoded.
 
 I<Example:> 
 
@@ -397,6 +398,18 @@
 
 =back
 
+$obj-E<gt>B<attributes>
+
+=over 4
+
+Returns a list of key-value pairs, where the values are not yet decoded.
+
+I<Example:> 
+
+ my %attributes = $head->get('Content-Disposition')->attributes;
+
+=back
+
 $obj-E<gt>B<comment>([STRING])
 
 =over 4
@@ -531,13 +544,10 @@
 wrapping is performed with L<fold()|Mail::Message::Field/"Internals"> and the results stored within
 the field object.
 
-Without LENGTH, the message will be folded, unless it is already folded.
-Pre-folded lines are detected on a trailing new-line character.
+I<Example:> refolding the field
 
-I<Example:> 
 
  $field->setWrapLength(99);
- $field->setWrapLength;
 
 =back
 
@@ -579,9 +589,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Field-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Field-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -1097,7 +1107,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Complete.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Complete.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Complete.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Head::Complete;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Head';
 
 use Mail::Box::Parser;
@@ -24,10 +24,28 @@
 
 #------------------------------------------
 
+
 sub build(@)
 {   my $self = shift;
     my $head = $self->new;
-    $head->add(shift, shift) while @_;
+    while(@_)
+    {   my $name = shift;
+
+        if($name->isa('Mail::Message::Field'))
+        {   $head->add($name);
+            next;
+        }
+
+        my $content = shift;
+        if(ref $content && $content->isa('Mail::Message::Field'))
+        {   $self->log(WARNING => "Field objects have an implied name ($name)");
+            $head->add($content);
+            next;
+        }
+
+        $head->add($name, $content);
+    }
+
     $head;
 }
 
@@ -49,6 +67,14 @@
 #------------------------------------------
 
 
+sub wrap($)
+{   my ($self, $length) = @_;
+    $_->setWrapLength($length) foreach $self->orderedFields;
+}
+
+#------------------------------------------
+
+
 sub add(@)
 {   my $self = shift;
 
@@ -296,7 +322,32 @@
 
 #------------------------------------------
 
+                                                                                
+sub printSelected($@)
+{   my ($self, $fh) = (shift, shift);
 
+    foreach my $field ($self->orderedFields)
+    {   my $Name = $field->Name;
+        my $name = $field->name;
+
+        my $found;
+        foreach my $pattern (@_)
+        {   $found = ref $pattern?($Name =~ $pattern):($name eq lc $pattern);
+            last if $found;
+        }
+
+           if(!$found)           { ; }
+        elsif(ref $fh eq 'GLOB') { print $fh "\n" }
+        else                     { $fh->print("\n") }
+    }
+                                                                                
+    $self;
+}
+
+
+#------------------------------------------
+
+
 sub toString() {shift->string}
 sub string()
 {   my $self  = shift;
@@ -413,7 +464,7 @@
 
     my $stamp = Mail::Message::Field->dateToTimestamp($recvd->comment);
 
-    $self->{MMH_recvstamp} = $stamp > 0 ? $stamp : undef;
+    $self->{MMH_recvstamp} = defined $stamp && $stamp > 0 ? $stamp : undef;
 }
 
 #------------------------------------------
@@ -435,7 +486,7 @@
         }
     }
 
-    $self->{MMH_timestamp} = $stamp > 0 ? $stamp : undef;
+    $self->{MMH_timestamp} = defined $stamp && $stamp > 0 ? $stamp : undef;
 }
 
 #------------------------------------------
@@ -460,39 +511,53 @@
 
     my $from   = $self->get('from') || '';
     my $stamp  = $self->timestamp;
-    my $sender = $from =~ m/\<.*?\>/ ? $& : 'unknown';
+    my $sender = $from =~ m/(\<.*?\>)/ ? $1 : 'unknown';
     "From $sender ".(gmtime $stamp)."\n";
 }
 
 #------------------------------------------
 
 
-my $unique_id     = time;
-my $hostname;
+my $msgid_creator;
 
 sub createMessageId()
-{   my $mid = shift->messageIdPrefix . '-' . $unique_id++;
+{   $msgid_creator ||= $_[0]->messageIdPrefix;
+    $msgid_creator->(@_);
+}
 
+#------------------------------------------
+
+
+sub messageIdPrefix(;$$)
+{   my $thing = shift;
+    return $msgid_creator
+       unless @_ || !defined $msgid_creator;
+
+    return $msgid_creator = shift
+       if @_==1 && ref $_[0] eq 'CODE';
+
+    my $prefix   = shift || "mailbox-$$";
+
+    my $hostname = shift;
     unless(defined $hostname)
     {   require Sys::Hostname;
         $hostname = Sys::Hostname::hostname() || 'localhost';
     }
 
-    $mid . '@' . $hostname;
-}
+    eval {require Time::HiRes};
+    if(Time::HiRes->can('gettimeofday'))
+    {
+        return $msgid_creator
+          = sub { my ($sec, $micro) = Time::HiRes::gettimeofday();
+                  "$prefix-$sec-$micro\@$hostname";
+                };
+    }
 
-#------------------------------------------
-
-
-our $unique_prefix;
-
-sub messageIdPrefix(;$)
-{   my $self = shift;
-    return $unique_prefix if !@_ && defined $unique_prefix;
-
-    $unique_prefix = shift || "mailbox-$$";
+    my $unique_id = time;
+    $msgid_creator
+      = sub { $unique_id++;
+              "$prefix-$unique_id\@$hostname";
+            };
 }
 
-#------------------------------------------
-
 1;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Complete.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Complete.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Complete.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -58,12 +58,10 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<build>(FIELDS)
+$obj-E<gt>B<build>([PAIR|FIELD]-LIST)
 
 =over 4
 
-See L<Mail::Message::Head/"Constructors">
-
 =back
 
 $obj-E<gt>B<clone>([FIELDS])
@@ -167,6 +165,20 @@
 
 =back
 
+$obj-E<gt>B<wrap>(INTEGER)
+
+=over 4
+
+Re-fold all fields from the header to contain at most INTEGER number of
+characters per line.
+
+I<Example:> re-folding a header
+
+
+ $msg->head->wrap(78);
+
+=back
+
 =head2 Access to the header
 
 
@@ -281,6 +293,7 @@
 Remove the field with the specified name.  If the header contained
 multiple lines with the same name, they will be replaced all together.
 This method simply calls L<reset()|Mail::Message::Head::Complete/"Access to the header"> without replacement fields.
+READ THE IMPORTANT WARNING IN L<removeField()|Mail::Message::Head::Complete/"Access to the header">
 
 =back
 
@@ -360,6 +373,22 @@
 
 =back
 
+$obj-E<gt>B<printSelected>(FILEHANDLE, (STRING|REGEXP)s)
+
+=over 4
+
+Like the usual L<print()|Mail::Message::Head::Complete/"Access to the header">, the header lines are printed to the specified
+FILEHANDLE.  In this case, however, only the fields with names as specified by
+STRING (case insensative) or REGEXP are printed.  They will stay the in-order
+of the source header.
+
+I<Example:> printing only a subset of the fields
+
+
+ $head->printSelected(STDOUT, qw/Subject From To/, qr/^x\-(spam|xyz)\-/i)
+
+=back
+
 $obj-E<gt>B<printUndisclosed>([FILEHANDLE])
 
 =over 4
@@ -392,6 +421,36 @@
 at the end of the name), which accepts a string or regular expression
 as argument to select the fields to be removed.
 
+WARNING WARNING WARNING: for performance reasons, the header administration
+uses weak references (see L<Scalar::Util> method weaken()> to figure-out
+which fields have been removed.  A header is a hash of field for fast search
+and an array of weak references to remember the order of the fields, required
+for printing.  If the field is removed from the hash, the weak-ref is set to
+undef and the field not printed.
+
+However... it is easy to disturb this process.  Example:
+ my $msg = ....;                 # subject ref-count = 1 + 0 = 1
+ $msg->head->delete('Subject');  # subject ref-count =     0 = 0: clean-up
+ $msg->print;                    # subject doesn't show: ok
+
+But
+ my $msg = ....;                 # subject ref-count = 1 + 0 = 1
+ my $s = $msg->head->get('subject'); # ref-count = 1 + 1 + 0 = 2
+ $msg->head->delete('Subject');  # subject ref-count = 1 + 0 = 1: no clean-up
+ $msg->print;                    # subject DOES show: not ok
+ undef $s;                       # ref-count becomes 0: clean-up
+ $msg->print;                    # subject doesn't show: ok
+
+To avoid the latter situation, do not catch the field object, but only
+the field content.  SAVE are all methods which return the text:
+ my $s = $msg->head->get('subject')->body;
+ my $s = $msg->head->get('subject')->unfoldedBody;
+ my $s = $msg->head->get('subject')->foldedBody;
+ my $s = $msg->head->get('subject')->foldedBody;
+ my $s = $msg->get('subject');
+ my $s = $msg->subject;
+ my $s = $msg->string;
+
 =back
 
 $obj-E<gt>B<removeFields>(STRING|REGEXP, [STRING|REGEXP, ...])
@@ -468,7 +527,7 @@
 
 Replace the values in the header fields named by NAME with the values
 specified in the list of FIELDS. A single name can correspond to multiple
-repeated fields.
+repeated fields.  READ THE IMPORTANT WARNING IN L<removeField()|Mail::Message::Head::Complete/"Access to the header">
 
 Removing fields which are part of one of the predefined field groups is
 not a smart idea.  You can better remove these fields as group, all
@@ -502,7 +561,7 @@
 
 The C<set> method is similar to the L<add()|Mail::Message::Head::Complete/"Access to the header"> method, and takes the same
 options. However, existing values for fields will be removed before a new
-value is added.
+value is added.  READ THE IMPORTANT WARNING IN L<removeField()|Mail::Message::Head::Complete/"Access to the header">
 
 =back
 
@@ -708,14 +767,44 @@
 
 =back
 
-$obj-E<gt>B<messageIdPrefix>([STRING])
+$obj-E<gt>B<messageIdPrefix>([PREFIX, [HOSTNAME]|CODE])
 
+Mail::Message::Head::Complete-E<gt>B<messageIdPrefix>([PREFIX, [HOSTNAME]|CODE])
+
 =over 4
 
-Sets/returns the message-id start.  The rest of the message-id is an
-integer which is derived from the current time and the local host.
-See L<createMessageId()|Mail::Message::Head::Complete/"Internals">.
+When options are provided, it sets a new way to create message-ids,
+as used by L<createMessageId()|Mail::Message::Head::Complete/"Internals">.  You have two choices: either by
+providing a PREFIX and optionally a HOSTNAME, or a CODE reference.
 
+The CODE reference will be called with the header as first argument.
+You must ensure yourself that the returned value is RFC compliant.
+
+The PREFIX defaults to C<mailbox-$$>, the HOSTNAME defaults to the
+return of L<Sys::Hostname>'s method C<hostname()>.  Inbetween the
+two, a nano-second time provided by L<Time::Hires> is used.  If that
+module is not available, C<time> is called at the start of the program,
+and incremented for each newly created id.
+
+In any case, a subroutine will be created to be used.  A reference
+to that will be returned.  When the method is called without arguments,
+but no subroutine is defined yet, one will be created.
+
+I<Example:> setting a message prefix
+
+
+  $head->messageIdPrefix('prefix');
+  Mail::Message::Head::Complete->messageIdPrefix('prefix');
+  my $code = $head->messageIdPrefix('mailbox', 'nohost');
+
+  sub new_msgid()
+  {   my $head = shift;
+      "myid-$$-${(rand 10000)}@example.com";
+  }
+
+  $many_msg->messageIdPrefix(\&new_msgid);
+  Mail::Message::Head::Complete->messageIdPrefix(&new_msgid);
+
 =back
 
 $obj-E<gt>B<moveLocation>(DISTANCE)
@@ -761,9 +850,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Head::Complete-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Head::Complete-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -876,6 +965,9 @@
 L<delete()|Mail::Message::Head::Complete/"Access to the header">, L<reset()|Mail::Message::Head::Complete/"Access to the header">, or L<set()|Mail::Message::Head::Complete/"Access to the header"> to do the job will not result
 in warnings: those methods check the existence of the field first.
 
+I<Warning:> Field objects have an implied name ($name)
+
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -898,7 +990,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Delayed.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Delayed.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Delayed.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Head::Delayed;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Head';
 
 use Object::Realize::Later

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Delayed.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Delayed.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Delayed.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -159,7 +159,7 @@
 there is also no body.
 
 For messages in directory or network organized folders,
-L<Mail::Message::size()|Mail::Message/"The Message"> usually will give a figure for the whole message
+L<Mail::Message::size()|Mail::Message/"The message"> usually will give a figure for the whole message
 without much cost.  Subtract a few hundred bytes for the header, and
 you will get a good estimate.
 
@@ -262,9 +262,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Head::Delayed-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Head::Delayed-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -398,7 +398,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/FieldGroup.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/FieldGroup.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/FieldGroup.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,7 +1,7 @@
 
 package Mail::Message::Head::FieldGroup;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use strict;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/FieldGroup.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/FieldGroup.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/FieldGroup.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -304,9 +304,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Head::FieldGroup-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Head::FieldGroup-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -451,7 +451,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ListGroup.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ListGroup.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ListGroup.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,7 +1,7 @@
 
 package Mail::Message::Head::ListGroup;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Head::FieldGroup';
 
 use strict;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ListGroup.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ListGroup.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ListGroup.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -292,9 +292,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Head::ListGroup-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Head::ListGroup-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -522,7 +522,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Partial.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Partial.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Partial.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Head::Partial;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Head::Complete';
 
 use Scalar::Util 'weaken';

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Partial.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Partial.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Partial.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -61,11 +61,11 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<build>(FIELDS)
+$obj-E<gt>B<build>([PAIR|FIELD]-LIST)
 
 =over 4
 
-See L<Mail::Message::Head/"Constructors">
+See L<Mail::Message::Head::Complete/"Constructors">
 
 =back
 
@@ -160,6 +160,14 @@
 
 =back
 
+$obj-E<gt>B<wrap>(INTEGER)
+
+=over 4
+
+See L<Mail::Message::Head::Complete/"The header">
+
+=back
+
 =head2 Access to the header
 
 
@@ -271,6 +279,14 @@
 
 =back
 
+$obj-E<gt>B<printSelected>(FILEHANDLE, (STRING|REGEXP)s)
+
+=over 4
+
+See L<Mail::Message::Head::Complete/"Access to the header">
+
+=back
+
 $obj-E<gt>B<printUndisclosed>([FILEHANDLE])
 
 =over 4
@@ -516,8 +532,10 @@
 
 =back
 
-$obj-E<gt>B<messageIdPrefix>([STRING])
+$obj-E<gt>B<messageIdPrefix>([PREFIX, [HOSTNAME]|CODE])
 
+Mail::Message::Head::Partial-E<gt>B<messageIdPrefix>([PREFIX, [HOSTNAME]|CODE])
+
 =over 4
 
 See L<Mail::Message::Head::Complete/"Internals">
@@ -567,9 +585,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Head::Partial-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Head::Partial-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -682,6 +700,9 @@
 L<delete()|Mail::Message::Head::Complete/"Access to the header">, L<reset()|Mail::Message::Head::Complete/"Access to the header">, or L<set()|Mail::Message::Head::Complete/"Access to the header"> to do the job will not result
 in warnings: those methods check the existence of the field first.
 
+I<Warning:> Field objects have an implied name ($name)
+
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -731,7 +752,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ResentGroup.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ResentGroup.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ResentGroup.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Head::ResentGroup;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Head::FieldGroup';
 
 use Scalar::Util 'weaken';

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ResentGroup.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ResentGroup.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/ResentGroup.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -490,9 +490,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Head::ResentGroup-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Head::ResentGroup-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -641,7 +641,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/SpamGroup.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/SpamGroup.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/SpamGroup.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -1,7 +1,7 @@
 
 package Mail::Message::Head::SpamGroup;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Head::FieldGroup';
 
 use strict;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/SpamGroup.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/SpamGroup.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/SpamGroup.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -346,9 +346,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Head::SpamGroup-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Head::SpamGroup-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -529,7 +529,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Subset.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Subset.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Subset.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Head::Subset;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Head';
 
 use Object::Realize::Later

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Subset.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Subset.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head/Subset.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -61,7 +61,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<build>(FIELDS)
+$obj-E<gt>B<build>([PAIR|FIELD]-LIST)
 
 =over 4
 
@@ -266,9 +266,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Head::Subset-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Head::Subset-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -397,7 +397,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Head;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use Mail::Message::Head::Complete;
@@ -161,7 +161,7 @@
 
 sub isMultipart()
 {   my $type = shift->get('Content-Type');
-    $type && $type->body =~ m[^multipart/]i;
+    $type && scalar $type->body =~ m[^multipart/]i;
 }
 
 #------------------------------------------

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Head.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Head.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Head.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -80,21 +80,25 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<build>(FIELDS)
+$obj-E<gt>B<build>([PAIR|FIELD]-LIST)
 
 =over 4
 
 A fast way to construct a header with many lines.
-The FIELDS are (name, content) pairs of the header.   A
+The PAIRs are C<(name, content)> pairs of the header, but it is also possible
+to pass L<Mail::Message::Field|Mail::Message::Field> objects.   A
 L<Mail::Message::Head::Complete|Mail::Message::Head::Complete> header is created by simply calling
-L<Mail::Message::Head::Complete::build()|Mail::Message::Head/"Constructors">, and then each field
+L<Mail::Message::Head::Complete::build()|Mail::Message::Head::Complete/"Constructors">, and then each field
 is added.  Double field names are permitted.
 
 I<Example:> 
 
+ my $subject = Mail::Message::Full->new(Subject => 'xyz');
+
  my $head = Mail::Message::Head->build
   ( From     => 'me at example.com'
   , To       => 'you at anywhere.aq'
+  , $subject
   , Received => 'one'
   , Received => 'two'
   );
@@ -384,9 +388,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Head-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Head-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -601,7 +605,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Part.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Part.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Part.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,10 +3,11 @@
 
 package Mail::Message::Part;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message';
-use Scalar::Util 'weaken';
 
+use Scalar::Util    'weaken';
+
 use Carp;
 
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Part.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Part.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Part.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -52,7 +52,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -60,20 +60,6 @@
 
 =back
 
-Mail::Message::Part-E<gt>B<coerce>(BODY|MESSAGE, MULTIPART, HEADERS)
-
-=over 4
-
-Transforms a BODY or MESSAGE to a real message part.  The MULTIPART
-refers to the parental body.
-
-When ta BODY is specified, extra HEADERS can be supplied as well.
-Bodies are coerced into message parts by calling L<buildFromBody()|Mail::Message::Part/"METHODS">.
-If you specify a MESSAGE residing in a folder, this message will
-automatically be cloned.
-
-=back
-
 Mail::Message::Part-E<gt>B<new>(OPTIONS)
 
 =over 4
@@ -142,7 +128,7 @@
 
 =back
 
-Mail::Message::Part-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Message::Part-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -272,14 +258,14 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -287,7 +273,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -295,7 +281,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -303,7 +289,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -311,7 +297,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -319,7 +305,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -327,7 +313,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -335,7 +321,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -343,7 +329,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -607,7 +593,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -626,6 +612,28 @@
 =head2 Internals
 
 
+$obj-E<gt>B<clonedFrom>
+
+=over 4
+
+See L<Mail::Message/"Internals">
+
+=back
+
+Mail::Message::Part-E<gt>B<coerce>(BODY|MESSAGE, MULTIPART, HEADERS)
+
+=over 4
+
+Transforms a BODY or MESSAGE to a real message part.  The MULTIPART
+refers to the parental body.
+
+When ta BODY is specified, extra HEADERS can be supplied as well.
+Bodies are coerced into message parts by calling L<buildFromBody()|Mail::Message::Part/"METHODS">.
+If you specify a MESSAGE residing in a folder, this message will
+automatically be cloned.
+
+=back
+
 $obj-E<gt>B<isDelayed>
 
 =over 4
@@ -701,9 +709,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Part-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Part-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -855,10 +863,18 @@
 
 I<Error:> No default mailer found to send message.
 
-The message L<send()|Mail::Message/"The Message"> mechanism had not enough information to automatically
+The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
 find a mail transfer agent to sent this message.  Specify a mailer
 explicitly using the C<via> options.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message::Part/"METHODS">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -872,6 +888,14 @@
 Message parts can not be destructed per part: only whole messages can
 be forcefully freed from memory. Consider L<delete()|Mail::Message/"Flags"> or L<rebuild()|Mail::Message::Construct::Rebuild/"Constructing a message">.
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -895,7 +919,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailHeader.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailHeader.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailHeader.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Message::Replace::MailHeader;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::Head::Complete';
 
 
@@ -176,7 +176,8 @@
 
 
 BEGIN
-{ *Mail::Header::new =
+{   no warnings;
+    *Mail::Header::new =
      sub { my $class = shift;
            Mail::Message::Replace::MailHeader->new(@_);
          }

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailHeader.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailHeader.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailHeader.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -14,7 +14,7 @@
 
 =head1 SYNOPSIS
 
- !!! VERY ALPHA CODE !!!
+ !!! ALPHA CODE !!!
 
  # change
  use Mail::Internet;
@@ -62,11 +62,11 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<build>(FIELDS)
+$obj-E<gt>B<build>([PAIR|FIELD]-LIST)
 
 =over 4
 
-See L<Mail::Message::Head/"Constructors">
+See L<Mail::Message::Head::Complete/"Constructors">
 
 =back
 
@@ -199,6 +199,14 @@
 
 =back
 
+$obj-E<gt>B<wrap>(INTEGER)
+
+=over 4
+
+See L<Mail::Message::Head::Complete/"The header">
+
+=back
+
 =head2 Access to the header
 
 
@@ -296,6 +304,14 @@
 
 =back
 
+$obj-E<gt>B<printSelected>(FILEHANDLE, (STRING|REGEXP)s)
+
+=over 4
+
+See L<Mail::Message::Head::Complete/"Access to the header">
+
+=back
+
 $obj-E<gt>B<printUndisclosed>([FILEHANDLE])
 
 =over 4
@@ -520,8 +536,10 @@
 
 =back
 
-$obj-E<gt>B<messageIdPrefix>([STRING])
+$obj-E<gt>B<messageIdPrefix>([PREFIX, [HOSTNAME]|CODE])
 
+Mail::Message::Replace::MailHeader-E<gt>B<messageIdPrefix>([PREFIX, [HOSTNAME]|CODE])
+
 =over 4
 
 See L<Mail::Message::Head::Complete/"Internals">
@@ -563,9 +581,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Replace::MailHeader-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Replace::MailHeader-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -838,6 +856,9 @@
 L<delete()|Mail::Message::Replace::MailHeader/"Access to the header">, L<reset()|Mail::Message::Head::Complete/"Access to the header">, or L<set()|Mail::Message::Head::Complete/"Access to the header"> to do the job will not result
 in warnings: those methods check the existence of the field first.
 
+I<Warning:> Field objects have an implied name ($name)
+
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -860,7 +881,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailInternet.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailInternet.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailInternet.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Message::Replace::MailInternet;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message';
 
 use Mail::Box::FastScalar;
@@ -96,9 +96,6 @@
 }
 
 
-sub coerce() { confess }
-
-
 sub dup()
 {   my $self = shift;
     ref($self)->coerce($self->clone);
@@ -343,11 +340,13 @@
 }
 
 
-BEGIN { *Mail::Internet::new =
-          sub { my $class = shift;
-                Mail::Message::Replace::MailInternet->new(@_);
-              }
-      }
+BEGIN {
+ no warnings;
+ *Mail::Internet::new =
+    sub { my $class = shift;
+          Mail::Message::Replace::MailInternet->new(@_);
+        }
+}
 
 
 sub isa($)
@@ -357,5 +356,8 @@
 }
 
 
+sub coerce() { confess }
+
+
 1;
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailInternet.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailInternet.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Replace/MailInternet.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -13,7 +13,7 @@
 
 =head1 SYNOPSIS
 
- !!! VERY ALPHA CODE !!!
+ !!! BETA !!!
 
  # change
  use Mail::Internet;
@@ -30,7 +30,7 @@
 and many methods are added.
 
 Most methods will work without any change, but you may need to have
-a look at your L<smtpsend()|Mail::Message::Replace::MailInternet/"The body"> and L<send()|Mail::Message::Replace::MailInternet/"The Message"> calls.
+a look at your L<smtpsend()|Mail::Message::Replace::MailInternet/"The body"> and L<send()|Mail::Message::Replace::MailInternet/"The message"> calls.
 
 
 =head1 OVERLOADED
@@ -43,7 +43,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -51,16 +51,6 @@
 
 =back
 
-Mail::Message::Replace::MailInternet-E<gt>B<coerce>(MESSAGE)
-
-=over 4
-
-Coerce (adapt type) of the specified MESSAGE (anything
-L<Mail::Message::coerce()|Mail::Message/"Constructors"> accepts) into an Mail::Internet simulating
-object.
-
-=back
-
 $obj-E<gt>B<dup>
 
 =over 4
@@ -215,7 +205,7 @@
 
 =back
 
-Mail::Message::Replace::MailInternet-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Message::Replace::MailInternet-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -503,14 +493,14 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -518,7 +508,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -526,7 +516,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -534,7 +524,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -543,7 +533,7 @@
 =over 4
 
 Send an NNTP message (newsgroup message), which is equivalent to
-Mail::Transport::NNTP or L<Mail::Message::send()|Mail::Message/"The Message"> with C<via 'nntp'>.
+Mail::Transport::NNTP or L<Mail::Message::send()|Mail::Message/"The message"> with C<via 'nntp'>.
 
  Option  Defined in       Default           
  Debug                    <false>           
@@ -563,7 +553,7 @@
 =over 4
 
 Prints the whole message to the specified FILEHANDLE, which default to
-STDOUT.  This calls L<Mail::Message::print()|Mail::Message/"The Message">.
+STDOUT.  This calls L<Mail::Message::print()|Mail::Message/"The message">.
 
 =back
 
@@ -580,7 +570,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -588,7 +578,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -596,7 +586,7 @@
 
 =over 4
 
-See L<Mail::Message/"The Message">
+See L<Mail::Message/"The message">
 
 =back
 
@@ -903,7 +893,7 @@
 
 =over 4
 
-This method is calling L<Mail::Message::send()|Mail::Message/"The Message"> via C<smtp>, which is
+This method is calling L<Mail::Message::send()|Mail::Message/"The message"> via C<smtp>, which is
 implemented in L<Mail::Transport::SMTP|Mail::Transport::SMTP>.  The implementation is
 slightly different, so this method is not 100% compliant.
 
@@ -1047,7 +1037,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -1063,9 +1053,41 @@
 
 =back
 
+=head2 The nasty bits
+
+
+$obj-E<gt>B<isa>(CLASS)
+
+Mail::Message::Replace::MailInternet-E<gt>B<isa>(CLASS)
+
+=over 4
+
+Of course, the C<isa()> class inheritance check should not see our
+nasty trick.
+
+=back
+
 =head2 Internals
 
 
+$obj-E<gt>B<clonedFrom>
+
+=over 4
+
+See L<Mail::Message/"Internals">
+
+=back
+
+Mail::Message::Replace::MailInternet-E<gt>B<coerce>(MESSAGE)
+
+=over 4
+
+Coerce (adapt type) of the specified MESSAGE (anything
+L<Mail::Message::coerce()|Mail::Message/"Internals"> accepts) into an Mail::Internet simulating
+object.
+
+=back
+
 $obj-E<gt>B<isDelayed>
 
 =over 4
@@ -1141,9 +1163,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::Replace::MailInternet-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::Replace::MailInternet-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -1272,22 +1294,8 @@
 
 =back
 
-=head2 The nasty bits
 
 
-$obj-E<gt>B<isa>(CLASS)
-
-Mail::Message::Replace::MailInternet-E<gt>B<isa>(CLASS)
-
-=over 4
-
-Of course, the C<isa()> class inheritance check should not see our
-nasty trick.
-
-=back
-
-
-
 =head1 DIAGNOSTICS
 
 I<Error:> Cannot include forward source as $include.
@@ -1304,6 +1312,14 @@
 
 If a forward message is created, a destination address must be specified.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message::Replace::MailInternet/"Internals">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -1312,6 +1328,14 @@
 not.  Probably you should investigate this and probably inform the author
 of the package.
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Replace::MailInternet/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -1335,7 +1359,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Base64.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Base64.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Base64.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Message::TransferEnc::Base64;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::TransferEnc';
 
 use MIME::Base64;
@@ -25,11 +25,7 @@
 sub decode($@)
 {   my ($self, $body, %args) = @_;
 
-    my $lines
-      = $body->isa('Mail::Message::Body::File')
-      ? $self->_decode_from_file($body)
-      : $self->_decode_from_lines($body);
-
+    my $lines = decode_base64($body->string);
     unless($lines)
     {   $body->transferEncoding('none');
         return $body;
@@ -47,21 +43,6 @@
      );
 }
 
-sub _decode_from_file($)
-{   my ($self, $body) = @_;
-    local $_;
-
-    my $in = $body->file || return;
-    my $unpacked = decode_base64(join '', $in->getlines);
-    $in->close;
-    $unpacked;
-}
-
-sub _decode_from_lines($)
-{   my ($self, $body) = @_;
-    join '', map { decode_base64($_) } $body->lines;
-}
-
 #------------------------------------------
 
 sub encode($@)

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Base64.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Base64.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Base64.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -124,9 +124,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::TransferEnc::Base64-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::TransferEnc::Base64-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -267,7 +267,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Binary.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Binary.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Binary.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Message::TransferEnc::Binary;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::TransferEnc';
 
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Binary.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Binary.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/Binary.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -112,9 +112,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::TransferEnc::Binary-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::TransferEnc::Binary-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -249,7 +249,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/EightBit.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/EightBit.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/EightBit.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Message::TransferEnc::EightBit;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::TransferEnc';
 
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/EightBit.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/EightBit.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/EightBit.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -123,9 +123,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::TransferEnc::EightBit-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::TransferEnc::EightBit-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -260,7 +260,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/QuotedPrint.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/QuotedPrint.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/QuotedPrint.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Message::TransferEnc::QuotedPrint;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::TransferEnc';
 
 use MIME::QuotedPrint;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/QuotedPrint.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/QuotedPrint.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/QuotedPrint.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -138,9 +138,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::TransferEnc::QuotedPrint-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::TransferEnc::QuotedPrint-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -275,7 +275,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/SevenBit.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/SevenBit.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/SevenBit.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Message::TransferEnc::SevenBit;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Message::TransferEnc';
 
 
@@ -34,7 +34,7 @@
     my $changes = 0;
 
     foreach ($body->lines)
-    {   $changes++ if s/[^\000-\127]/chr(ord($&) & 0x7f)/ge;
+    {   $changes++ if s/([^\000-\127])/chr(ord($1) & 0x7f)/ge;
         $changes++ if s/[\000\013]//g;
 
         $changes++ if length > 997;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/SevenBit.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/SevenBit.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc/SevenBit.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -124,9 +124,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::TransferEnc::SevenBit-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::TransferEnc::SevenBit-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -261,7 +261,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Message::TransferEnc;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/TransferEnc.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -186,9 +186,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message::TransferEnc-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message::TransferEnc-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -323,7 +323,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Wrapper/SpamAssassin.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Wrapper/SpamAssassin.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Wrapper/SpamAssassin.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message::Wrapper::SpamAssassin;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::SpamAssassin::Message';
 
 use Carp;
@@ -32,7 +32,14 @@
 
 sub get_header($)
 {   my ($self, $name) = @_;
-    my $field = $self->get_mail_object->head->get($name);
+    my $head = $self->get_mail_object->head;
+
+    # Return all fields unfolded in list context
+    return map { $_->unfoldedBody } $head->get($name)
+        if wantarray;
+
+    # Only one field is expected
+    my $field = $head->get($name);
     defined $field ? $field->unfoldedBody : undef;
 }
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message/Wrapper/SpamAssassin.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message/Wrapper/SpamAssassin.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message/Wrapper/SpamAssassin.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -59,7 +59,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Message;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use Mail::Message::Part;
@@ -15,6 +15,7 @@
 use Mail::Message::Body::Nested;
 
 use Carp;
+use Scalar::Util   'weaken';
 
 
 our $crlf_platform;
@@ -65,61 +66,23 @@
 #------------------------------------------
 
 
-my $mail_internet_converter;
-my $mime_entity_converter;
+sub clone(@)
+{   my ($self, %args) = @_;
 
-sub coerce($)
-{   my ($class, $message) = @_;
-
-    return bless $message, $class
-        if $message->isa(__PACKAGE__);
-
-    if($message->isa('MIME::Entity'))
-    {   unless($mime_entity_converter)
-        {   eval {require Mail::Message::Convert::MimeEntity};
-                confess "Install MIME::Entity" if $@;
-
-            $mime_entity_converter = Mail::Message::Convert::MimeEntity->new;
-        }
-
-        $message = $mime_entity_converter->from($message)
-            or return;
-    }
-
-    elsif($message->isa('Mail::Internet'))
-    {   unless($mail_internet_converter)
-        {   eval {require Mail::Message::Convert::MailInternet};
-            confess "Install Mail::Internet" if $@;
-
-           $mail_internet_converter = Mail::Message::Convert::MailInternet->new;
-        }
-
-        $message = $mail_internet_converter->from($message)
-            or return;
-    }
-
-    else
-    {   my $what = ref $message ? 'a'.ref($message).' object' : 'text';
-        confess "Cannot coerce $what into a ". __PACKAGE__." object.\n";
-    }
-
-    $message->{MM_modified}  ||= 0;
-    bless $message, $class;
-}
-
-#------------------------------------------
-
-
-sub clone()
-{   my $self  = shift;
-
     # First clone body, which may trigger head load as well.  If head is
     # triggered first, then it may be decided to be lazy on the body at
     # moment.  And then the body would be triggered.
 
+    my ($head, $body) = ($self->head, $self->body);
+    $head = $head->clone
+       unless $args{shallow} || $args{shallow_head};
+
+    $body = $body->clone
+       unless $args{shallow} || $args{shallow_body};
+
     my $clone = Mail::Message->new
-     ( body  => $self->body->clone
-     , head  => $self->head->clone
+     ( head  => $head
+     , body  => $body
      , $self->logSettings
      );
 
@@ -128,6 +91,10 @@
     delete $labels{deleted};
 
     $clone->{MM_labels} = \%labels;
+
+    $clone->{MM_cloned} = $self;
+    weaken($clone->{MM_cloned});
+
     $clone;
 }
 
@@ -197,11 +164,11 @@
 
     my %args = @_;
     if( ! $args{via} && defined $default_mailer )
-    {   $mailer = $default_mailer
+    {   $mailer = $default_mailer;
     }
     else
     {   my $via = delete $args{via} || 'sendmail';
-        $default_mailer = $mailer = Mail::Transport->new(via => $via);
+        $default_mailer = $mailer = Mail::Transport->new(via => $via, %args);
     }
 
     $mailer->send($self, %args);
@@ -228,7 +195,7 @@
         return undef;
     }
 
-    $self->log(INTERNAL => "wrong type of head for $self")
+    $self->log(INTERNAL => "wrong type of head for message $self")
         unless ref $head && $head->isa('Mail::Message::Head');
 
     $head->message($self);
@@ -248,7 +215,8 @@
 
 
 sub get($)
-{   my $field = shift->head->get(shift) || return undef;
+{   my $self  = shift;
+    my $field = $self->head->get(shift) || return undef;
     $field->body;
 }
 
@@ -263,7 +231,10 @@
 #-------------------------------------------
 
 
-sub from() { map {$_->addresses} shift->head->get('From') }
+sub from()
+{  my $from = shift->head->get('From') or return ();
+   map {$_->addresses} $from;
+}
 
 #-------------------------------------------
 
@@ -351,7 +322,7 @@
         return $body;
     }
 
-    $self->log(INTERNAL => "wrong type of body for $rawbody")
+    $self->log(INTERNAL => "wrong type of body for message $rawbody")
         unless ref $rawbody && $rawbody->isa('Mail::Message::Body');
 
     # Bodies of real messages must be encoded for safe transmission.
@@ -468,7 +439,7 @@
 #------------------------------------------
 
 
-sub label($;$)
+sub label($;$@)
 {   my $self   = shift;
     return $self->{MM_labels}{$_[0]} unless @_ > 1;
     my $return = $_[1];
@@ -568,6 +539,56 @@
 
 
 #------------------------------------------
+
+
+my $mail_internet_converter;
+my $mime_entity_converter;
+
+sub coerce($@)
+{   my ($class, $message) = @_;
+
+    return bless $message, $class
+        if $message->isa(__PACKAGE__);
+
+    if($message->isa('MIME::Entity'))
+    {   unless($mime_entity_converter)
+        {   eval {require Mail::Message::Convert::MimeEntity};
+                confess "Install MIME::Entity" if $@;
+
+            $mime_entity_converter = Mail::Message::Convert::MimeEntity->new;
+        }
+
+        $message = $mime_entity_converter->from($message)
+            or return;
+    }
+
+    elsif($message->isa('Mail::Internet'))
+    {   unless($mail_internet_converter)
+        {   eval {require Mail::Message::Convert::MailInternet};
+            confess "Install Mail::Internet" if $@;
+
+           $mail_internet_converter = Mail::Message::Convert::MailInternet->new;
+        }
+
+        $message = $mail_internet_converter->from($message)
+            or return;
+    }
+
+    else
+    {   my $what = ref $message ? 'a'.ref($message).' object' : 'text';
+        confess "Cannot coerce $what into a ". __PACKAGE__." object.\n";
+    }
+
+    $message->{MM_modified}  ||= 0;
+    bless $message, $class;
+}
+
+#------------------------------------------
+
+
+sub clonedFrom() { shift->{MM_cloned} }
+
+#------------------------------------------
 # All next routines try to create compatibility with release < 2.0
 sub isParsed()   { not shift->isDelayed }
 sub headIsRead() { not shift->head->isa('Mail::Message::Delayed') }
@@ -646,6 +667,7 @@
         , checked           => $self->{MM_trusted}
         , $self->logSettings
         );
+
         $body->contentInfoFrom($head);
     }
 
@@ -655,7 +677,7 @@
     $body->read
       ( $parser, $head, $getbodytype,
       , $size, (defined $lines ? int $lines->body : undef)
-      ) or return;
+      );
 }
 
 #------------------------------------------
@@ -715,10 +737,7 @@
 
 sub shortString()
 {   my $self    = shift;
-    my $subject = $self->head->get('subject') || '';
-    chomp $subject;
-
-    sprintf "%4s(%2d) %-30.30s", $self->shortSize, $subject;
+    sprintf "%4s %-30.30s", $self->shortSize, $self->subject;
 }
 
 #------------------------------------------

Modified: packages/libmail-box-perl/trunk/lib/Mail/Message.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Message.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Message.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -7,14 +7,14 @@
 =head1 INHERITANCE
 
  Mail::Message has extra code in
+   Mail::Message::Construct
+   Mail::Message::Construct::Rebuild
+   Mail::Message::Construct::Text
    Mail::Message::Construct::Forward
-   Mail::Message::Construct::Text
+   Mail::Message::Construct::Bounce
+   Mail::Message::Construct::Read
    Mail::Message::Construct::Build
-   Mail::Message::Construct::Rebuild
-   Mail::Message::Construct::Bounce
-   Mail::Message::Construct
    Mail::Message::Construct::Reply
-   Mail::Message::Construct::Read
 
  Mail::Message
    is a Mail::Reporter
@@ -70,7 +70,7 @@
 =head2 Constructors
 
 
-$obj-E<gt>B<clone>
+$obj-E<gt>B<clone>(OPTIONS)
 
 =over 4
 
@@ -87,56 +87,49 @@
 
 See also L<Mail::Box::Message::copyTo()|Mail::Box::Message/"The message"> and L<Mail::Box::Message::moveTo()|Mail::Box::Message/"The message">.
 
-I<Example:> 
+ Option        Defined in       Default
+ shallow                        <false>
+ shallow_body                   <false>
+ shallow_head                   <false>
 
- $copy = $msg->clone;
+. shallow BOOLEAN
 
+=over 4
+
+When a shallow clone is made, the header and body of the message will not
+be cloned, but shared.  This is quite dangerous: for instance in some
+folder types, the header fields are used to store folder flags.  When
+one of both shallow clones change the flags, that will update the header
+and thereby be visible in both.
+
+There are situations where a shallow clone can be used safely.  For instance,
+when L<Mail::Box::Message::moveTo()|Mail::Box::Message/"The message"> is used and you are sure that the
+original message cannot get undeleted after the move.
+
 =back
 
-Mail::Message-E<gt>B<coerce>(MESSAGE)
+. shallow_body BOOLEAN
 
 =over 4
 
-Coerce a MESSAGE into a Mail::Message.  In some
-occasions, for instance where you add a message to a folder, this
-coercion is automatically called to ensure that the correct message
-type is stored.
+A rather safe bet, because you are not allowed to modify the body of a
+message: you may only set a new body with L<body()|Mail::Message/"The body">.
 
-The coerced message is returned on success, otherwise C<undef>.  The
-coerced message may be a reblessed version of the original message
-or a new object.  In case the message has to be specialized, for
-instance from a general Mail::Message into a Mail::Box::Mbox::Message,
-no copy is needed.  However, to coerce a Mail::Internet object into
-a Mail::Message, a lot of copying and converting will take place.
+=back
 
-Valid MESSAGEs which can be coerced into Mail::Message objects
-are of type
+. shallow_head BOOLEAN
 
 =over 4
 
-=item * Any type of L<Mail::Box::Message|Mail::Box::Message>
+Only the head uses is reused, not the body.  This is probably a bad choice,
+because the header fields can be updated, for instance when labels change.
 
-=item * MIME::Entity's, using L<Mail::Message::Convert::MimeEntity|Mail::Message::Convert::MimeEntity>
-
-=item * Mail::Internet's, using L<Mail::Message::Convert::MailInternet|Mail::Message::Convert::MailInternet>
-
 =back
 
-L<Mail::Message::Part|Mail::Message::Part>'s, which are extensions of C<Mail::Message>'s,
-can also be coerced directly from a L<Mail::Message::Body|Mail::Message::Body>.
-
 I<Example:> 
 
- my $folder  = Mail::Box::Mbox->new;
- my $message = Mail::Message->build(...);
+ $copy = $msg->clone;
 
- my $coerced = Mail::Box::Mbox::Message->coerce($message);
- $folder->addMessage($coerced);
-
-Simpler replacement for the previous two lines:
-
- my $coerced = $folder->addMessage($message);
-
 =back
 
 Mail::Message-E<gt>B<new>(OPTIONS)
@@ -209,7 +202,7 @@
 
 Initial values of the labels.  In case of L<Mail::Box::Message|Mail::Box::Message>'s, this
 shall reflect the state the message is in.  For newly constructed
-L<Mail::Message|Mail::Message>'s, this may be anything you want, because L<coerce()|Mail::Message/"Constructors">
+L<Mail::Message|Mail::Message>'s, this may be anything you want, because L<coerce()|Mail::Message/"Internals">
 will take care of the folder specifics once the message is added to one.
 
 =back
@@ -261,7 +254,7 @@
 
 =back
 
-Mail::Message-E<gt>B<build>([MESSAGE|BODY], CONTENT)
+Mail::Message-E<gt>B<build>([MESSAGE|PART|BODY], CONTENT)
 
 =over 4
 
@@ -383,7 +376,7 @@
 
 =back
 
-=head2 The Message
+=head2 The message
 
 
 $obj-E<gt>B<container>
@@ -448,7 +441,7 @@
 
 Print the message to the FILE-HANDLE, which defaults to the selected
 filehandle, without the encapsulation sometimes required by a folder
-type, like L<write()|Mail::Message/"The Message"> does.
+type, like L<write()|Mail::Message/"The message"> does.
 
 I<Example:> 
 
@@ -496,8 +489,8 @@
 =over 4
 
 Returns an estimated size of the whole message in bytes.  In many occasions,
-the functions which process the message further, for instance L<send()|Mail::Message/"The Message">
-or L<print()|Mail::Message/"The Message"> will need to add/change header lines or add CR characters,
+the functions which process the message further, for instance L<send()|Mail::Message/"The message">
+or L<print()|Mail::Message/"The message"> will need to add/change header lines or add CR characters,
 so the size is only an estimate with a few percent margin of the real
 result.
 
@@ -527,7 +520,7 @@
 FILEHANDLE, with all surrounding information which is needed to put
 it correctly in a folder file.
 
-In most cases, the result of C<write> will be the same as with L<print()|Mail::Message/"The Message">.
+In most cases, the result of C<write> will be the same as with L<print()|Mail::Message/"The message">.
 The main exception is for Mbox folder messages, which will get printed
 with their leading 'From ' line and a trailing blank.  Each line of
 their body which starts with 'From ' will have an 'E<gt>' added in front.
@@ -583,13 +576,14 @@
 
 =over 4
 
-Returns the address of the sender.  It is possible to have more than
-one address specified in the C<From> field of the message. Therefore a
-list of Mail::Address objects is returned, which usually has
-length 1.
+Returns the addresses from the senders.  It is possible to have more than
+one address specified in the C<From> field of the message, according
+to the specification. Therefore a list of Mail::Address objects is
+returned, which usually has length 1.
 
-If you need one address of a sender, for instance to create a reply to,
-then use L<sender()|Mail::Message/"The header">.
+If you need only one address from a sender, for instance to create a
+"original message by" line in constructed forwarded message body, then use
+L<sender()|Mail::Message/"The header">.
 
 I<Example:> using from() to get all sender addresses
 
@@ -735,8 +729,8 @@
 
 To start, the received headers are tried for a date (see
 L<Mail::Message::Head::Complete::recvstamp()|Mail::Message::Head::Complete/"About the body">) and only then the C<Date>
-field.  When no date was found, C<undef> will be returned.  This may be
-very usual, because MailBox message constructors add a Date automatically.
+field.  In very rare cases, only with some locally produced messages,
+no stamp can be found.
 
 =back
 
@@ -1066,7 +1060,7 @@
 
 =back
 
-$obj-E<gt>B<printStructure>([FILEHANDLE][, INDENT])
+$obj-E<gt>B<printStructure>([FILEHANDLE|undef],[INDENT])
 
 =over 4
 
@@ -1085,6 +1079,61 @@
 =head2 Internals
 
 
+$obj-E<gt>B<clonedFrom>
+
+=over 4
+
+Returns the MESSAGE which is the source of this message, which was
+created by a L<clone()|Mail::Message/"Constructors"> operation.
+
+=back
+
+Mail::Message-E<gt>B<coerce>(MESSAGE, OPTIONS)
+
+=over 4
+
+Coerce a MESSAGE into a Mail::Message.  In some
+occasions, for instance where you add a message to a folder, this
+coercion is automatically called to ensure that the correct message
+type is stored.
+
+The coerced message is returned on success, otherwise C<undef>.  The
+coerced message may be a reblessed version of the original message
+or a new object.  In case the message has to be specialized, for
+instance from a general Mail::Message into a Mail::Box::Mbox::Message,
+no copy is needed.  However, to coerce a Mail::Internet object into
+a Mail::Message, a lot of copying and converting will take place.
+
+Valid MESSAGEs which can be coerced into Mail::Message objects
+are of type
+
+=over 4
+
+=item * Any type of L<Mail::Box::Message|Mail::Box::Message>
+
+=item * MIME::Entity's, using L<Mail::Message::Convert::MimeEntity|Mail::Message::Convert::MimeEntity>
+
+=item * Mail::Internet's, using L<Mail::Message::Convert::MailInternet|Mail::Message::Convert::MailInternet>
+
+=back
+
+L<Mail::Message::Part|Mail::Message::Part>'s, which are extensions of C<Mail::Message>'s,
+can also be coerced directly from a L<Mail::Message::Body|Mail::Message::Body>.
+
+I<Example:> 
+
+ my $folder  = Mail::Box::Mbox->new;
+ my $message = Mail::Message->build(...);
+
+ my $coerced = Mail::Box::Mbox::Message->coerce($message);
+ $folder->addMessage($coerced);
+
+Simpler replacement for the previous two lines:
+
+ my $coerced = $folder->addMessage($message);
+
+=back
+
 $obj-E<gt>B<isDelayed>
 
 =over 4
@@ -1183,9 +1232,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Message-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Message-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -1269,8 +1318,9 @@
 
 =over 4
 
-Convert the message header to a short string, representing the most
-important facts (for debugging purposes only).
+Convert the message header to a short string (without trailing newline),
+representing the most important facts (for debugging purposes only).  For
+now, it only reports size and subject.
 
 =back
 
@@ -1355,10 +1405,18 @@
 
 I<Error:> No default mailer found to send message.
 
-The message L<send()|Mail::Message/"The Message"> mechanism had not enough information to automatically
+The message L<send()|Mail::Message/"The message"> mechanism had not enough information to automatically
 find a mail transfer agent to sent this message.  Specify a mailer
 explicitly using the C<via> options.
 
+I<Error:> Only build() Mail::Message's; they are not in a folder yet
+
+You may wish to construct a message to be stored in a some kind
+of folder, but you need to do that in two steps.  First, create a
+normal L<Mail::Message|Mail::Message>, and then add it to the folder.  During this
+L<Mail::Box::addMessage()|Mail::Box/"The folder"> process, the message will get L<coerce()|Mail::Message/"Internals">-d
+into the right message type, adding storage information and the like.
+
 I<Error:> Package $package does not implement $method.
 
 Fatal error: the specific package (or one of its superclasses) does not
@@ -1367,6 +1425,14 @@
 not.  Probably you should investigate this and probably inform the author
 of the package.
 
+I<Error:> bounce requires To, Cc, or Bcc
+
+The message L<bounce()|Mail::Message::Construct::Bounce/"Constructing a message"> method forwards a received message off to someone
+else without modification; you must specified it's new destination.
+If you have the urge not to specify any destination, you probably
+are looking for L<reply()|Mail::Message::Construct::Reply/"Constructing a message">. When you wish to modify the content, use
+L<forward()|Mail::Message::Construct::Forward/"Constructing a message">.
+
 I<Error:> forwardAttach requires a preamble object
 
 
@@ -1544,6 +1610,11 @@
 be set by MailBox, because it would probably conflict with the user's
 idea of what is old.
 
+=item * passed
+
+Not often used or kept, this flag indicates that the message was bounced
+or forwarded to someone else.
+
 =item * replied
 
 The user (or application) has sent a message back to the sender of
@@ -1589,7 +1660,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Reporter.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Reporter.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Reporter.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Reporter;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 
 use Carp;
 use Scalar::Util 'dualvar';
@@ -23,9 +23,7 @@
     (bless {}, $class)->init({@_});
 }
 
-my $default_log   = $levelprio{WARNINGS};
-my $default_trace = $levelprio{WARNINGS};
-
+my($default_log, $default_trace, $trace_callback);
 sub init($)
 {   my ($self, $args) = @_;
     $self->{MR_log}   = $levelprio{$args->{log}   || $default_log};
@@ -36,26 +34,45 @@
 #------------------------------------------
 
 
+sub _trace_warn($$$)
+{   my ($who, $level, $text) = @_;
+    warn "$level: $text\n";
+}
+
 sub defaultTrace(;$$)
 {   my $thing = shift;
 
-    if(@_)
-    {   my ($log, $trace) = @_==1 ? ($_[0], $_[0]) : @_;
+    return ($default_log, $default_trace)
+        unless @_;
 
-        $default_log   = $levelprio{$log}
-           or croak "Undefined log level $log";
+    my $level = shift;
+    my $prio  = $thing->logPriority($level)
+        or croak "Unknown trace-level $level.";
 
-        $default_trace = $levelprio{$trace}
-           or croak "Undefined trace level $trace";
+    if( ! @_)
+    {   $default_log    = $default_trace = $prio;
+        $trace_callback = \&_trace_warn;
     }
+    elsif(ref $_[0])
+    {   $default_log    = $thing->logPriority('NONE');
+        $default_trace  = $prio;
+        $trace_callback = shift;
+    }
+    else
+    {   $default_log    = $prio;
+        $default_trace  = $thing->logPriority(shift);
+        $trace_callback = \&_trace_warn;
+    }
 
-    ( $thing->logPriority($default_log), $thing->logPriority($default_trace) );
+    ($default_log, $default_trace);
 }
 
+__PACKAGE__->defaultTrace('WARNINGS');
+
 #------------------------------------------
 
 
-sub trace(;$)
+sub trace(;$$)
 {   my $self = shift;
 
     return $self->logPriority($self->{MR_trace})
@@ -71,9 +88,9 @@
 #------------------------------------------
 
 
-# Implementation detail: the C code avoids calls back to Perl by
-# checking the trace-level itself.  In the perl code of this module
-# however, just always call the log() method, and let it check
+# Implementation detail: the Mail::Box::Parser::C code avoids calls back
+# to Perl by checking the trace-level itself.  In the perl code of this
+# module however, just always call the log() method, and let it check
 # whether or not to display it.
 
 sub log(;$@)
@@ -87,12 +104,11 @@
         my $prio  = $levelprio{$level}
             or croak "Unknown log-level $level";
 
-        return $thing->{MR_log} = $prio unless @_;
+        return $thing->{MR_log} = $prio
+            unless @_;
 
         my $text    = join '', @_;
-        $text      .= "\n" unless (substr $text, -1) eq "\n";
-
-        warn "$level: $text"
+        $trace_callback->($thing, $level, $text)
             if $prio >= $thing->{MR_trace};
 
         push @{$thing->{MR_report}[$prio]}, $text
@@ -103,12 +119,8 @@
         my $prio  = $levelprio{$level}
             or croak "Unknown log-level $level";
 
-        return $thing unless $prio >= $default_trace;
-
-        my $text    = join '', @_;
-        $text      .= "\n" unless (substr $text, -1) eq "\n";
-
-        warn "$level: $text";
+        $trace_callback->($thing, $level, join('', at _)) 
+           if $prio >= $default_trace;
     }
 
     $thing;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Reporter.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Reporter.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Reporter.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -96,33 +96,52 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Reporter-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Reporter-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
-Reports the default trace and log LEVEL which is used for object as list
+Reports the default log and trace level which is used for object as list
 of two elements.  When not explicitly set, both are set to C<WARNINGS>.
-Two values are returned: the first is the log level, the second represents
-the trace level.  Both are special variables: in numeric context they
-deliver a value (the internally used value), and in string context the
-string name.  Be warned that the string is always singular!
 
-You may specify one or two arguments.  In case of one argument, the
-default log and trace levels will both be set to that value.  When two
-levels are specified, the first represent the default log-level and
-the second the default trace level.
+This method has three different uses. When one argument is specified, that
+LEVEL is set for both loglevel as tracelevel.
 
-I<Example:> 
+With two arguments, the second determines which configuration you like.  If
+the second argument is a CODE reference, you install a CALLBACK.  The loglevel
+will be set to NONE, and all warnings produced in your program will get
+passed to the CALLBACK function.  That function will get the problem level,
+the object or class which reports the problem, and the problem text passed
+as arguments.
 
+In any case two values are returned: the first is the log level, the
+second represents the trace level.  Both are special variables: in numeric
+context they deliver a value (the internally used value), and in string
+context the string name.  Be warned that the string is always in singular
+form!
+
+I<Example:> setting loglevels
+
+
  my ($loglevel, $tracelevel) = Mail::Reporter->defaultTrace;
  Mail::Reporter->defaultTrace('NOTICES');
 
  my ($l, $t) = Mail::Reporter->defaultTrace('WARNINGS', 'DEBUG');
  print $l;     # prints "WARNING"  (no S!)
  print $l+0;   # prints "4"
+ print "Auch" if $l >= $self->logPriority('ERROR');
 
+ Mail::Reporter->defaultTrace('NONE');  # silence all reports
+
+ $folder->defaultTrace('DEBUG');   # Still set as global default!
+ $folder->trace('DEBUG');          # local default
+
+I<Example:> installing a callback
+
+
+ Mail::Reporter->defaultTrace
+
 =back
 
 $obj-E<gt>B<errors>
@@ -338,7 +357,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Copied: packages/libmail-box-perl/trunk/lib/Mail/Server (from rev 840, packages/libmail-box-perl/branches/upstream/current/lib/Mail/Server)

Copied: packages/libmail-box-perl/trunk/lib/Mail/Server.pm (from rev 840, packages/libmail-box-perl/branches/upstream/current/lib/Mail/Server.pm)

Copied: packages/libmail-box-perl/trunk/lib/Mail/Server.pod (from rev 840, packages/libmail-box-perl/branches/upstream/current/lib/Mail/Server.pod)

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/Exim.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/Exim.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/Exim.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Transport::Exim;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Transport::Send';
 
 use Carp;
@@ -32,14 +32,14 @@
 {   my ($self, $message, %args) = @_;
 
     my $from = $args{from} || $message->sender;
-    $from    = $from->address if $from->isa('Mail::Address');
+    $from    = $from->address if ref $from && $from->isa('Mail::Address');
     my @to   = map {$_->address} $self->destinations($message, $args{to});
 
     my $program = $self->{MTS_program};
     if(open(MAILER, '|-')==0)
     {   { exec $program, '-i', '-f', $from, @to; }  # {} to avoid warning
         $self->log(NOTICE => "Errors when opening pipe to $program: $!");
-        return 0;
+        exit 1;
     }
 
     $self->putContent($message, \*MAILER, undisclosed => 1);

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/Exim.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/Exim.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/Exim.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -158,9 +158,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Transport::Exim-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Transport::Exim-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -311,7 +311,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/IMAP4.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/IMAP4.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/IMAP4.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Transport::IMAP4;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Transport::Receive';
 
 use Digest::HMAC_MD5;   # only availability check for CRAM_MD5
@@ -36,8 +36,8 @@
     {   $imap = $self->createImapClient($imap) or return undef;
     }
  
-    $self->imapClient($imap);
-    $self->login or return undef;
+    $self->imapClient($imap) or return undef;
+    $self->login             or return undef;
 }
 
 #------------------------------------------
@@ -65,22 +65,37 @@
         $ntml_installed = ! $@;
     }
 
+    # What the client wants to use to login
+
     if(@types == 1 && $types[0] eq 'AUTO')
     {   @types = ('CRAM-MD5', ($ntml_installed ? 'NTLM' : ()), 'PLAIN');
     }
 
-    my @auth;
+    my @clientside;
     foreach my $auth (@types)
-    {   push @auth,
-             ref $auth eq 'ARRAY' ? $auth
+    {   push @clientside
+           , ref $auth eq 'ARRAY' ? $auth
            : $auth eq 'NTLM'      ? [NTLM  => \&Authen::NTLM::ntlm ]
            :                        [$auth => undef];
     }
 
-    $self->log(WARNING => 'module Authen::NTLM is not installed')
-        if grep { !ref $_ &&  $_ eq 'NTLM' } @auth;
+    my %clientside = map { ($_->[0] => $_) } @clientside;;
 
+    # What does the server support? in its order of preference.
+
+    my $imap = $self->imapClient or return ();
+    my @serverside = map { m/^AUTH=(\w+)/ ? uc($1) : () }
+                        $imap->capability;
+
+    my @auth;
+    if(@serverside)  # server list auth capabilities
+    {   @auth = map { $clientside{$_->[0]} ? delete $clientside{$_->[0]} : () }
+             @serverside;
+    }
+    @auth = @clientside unless @auth;  # fallback to client's preference
+
     $self->{MTI_auth} = \@auth;
+    @auth;
 }
 
 #------------------------------------------
@@ -235,13 +250,19 @@
 
 
 # Explanation in Mail::Box::IMAP4::Message chapter DETAILS
+
 my %flags2labels =
- ( '\Seen'     => [seen     => 1]
+ ( # Standard IMAP4 labels
+   '\Seen'     => [seen     => 1]
  , '\Answered' => [replied  => 1]
  , '\Flagged'  => [flagged  => 1]
  , '\Deleted'  => [deleted  => 1]
  , '\Draft'    => [draft    => 1]
  , '\Recent'   => [old      => 0]
+
+   # For the Netzwert extension (Mail::Box::Netzwert), some labels were
+   # added.  You'r free to support them as well.
+ , '\Spam'     => [spam     => 1]
  );
 
 my %labels2flags;
@@ -254,23 +275,25 @@
 
 sub getFlags($$)
 {   my ($self, $id) = @_;
-    my $imap  = $self->imapClient or return ();
+    my $imap   = $self->imapClient or return ();
+    my $labels = $self->flagsToLabels(SET => $imap->flags($id));
 
-    my %flags;
-    $flags{$_}++ foreach $imap->flags($id);
-
-    my @labels;
-    while(my ($k, $v) = each %flags2labels)
-    {   my ($label, $positive) = @$v;
-        push @labels, $label => (exists $flags{$k} ? $positive : !$positive);
+    # Add default values for missing flags
+    foreach  my $s (values %flags2labels)
+    {   $labels->{$_->[0]} = not $_->[1] unless exists $labels->{$_->[0]};
     }
 
-    @labels;
+    $labels;
 }
 
 #------------------------------------------
 
 
+sub listFlags() { keys %flags2labels }
+
+#------------------------------------------
+
+
 # Mail::IMAPClient can only set one value a time, however we do more...
 sub setFlags($@)
 {   my ($self, $id) = (shift, shift);
@@ -320,12 +343,43 @@
         }
     }
 
-    join(" ", @set);
+    join " ", sort @set;
 }
 
 #------------------------------------------
 
 
+sub flagsToLabels($@)
+{   my ($thing, $what) = (shift, shift);
+    my %labels;
+
+    my $clear = $what eq 'CLEAR';
+
+    foreach my $f (@_)
+    {   if(my $lab = $flags2labels{$f})
+        {   $labels{$lab->[0]} = $clear ? not($lab->[1]) : $lab->[1];
+        }
+        else
+        {   (my $lab = $f) =~ s,^\\,,;
+            $labels{$lab}++;
+        }
+    }
+
+    if($what eq 'REPLACE')
+    {   my %found = map { ($_ => 1) } @_;
+        foreach my $f (keys %flags2labels)
+        {   next if $found{$f};
+            my $lab = $flags2labels{$f};
+            $labels{$lab->[0]} = not $lab->[1];
+        }
+    }
+
+    wantarray ? %labels : \%labels;
+}
+
+#------------------------------------------
+
+
 sub getFields($@)
 {   my ($self, $id) = (shift, shift);
     my $imap   = $self->imapClient or return ();
@@ -420,6 +474,14 @@
 #------------------------------------------
 
 
+sub deleteFolder($)
+{   my $imap = shift->imapClient or return ();
+    $imap->delete(shift);
+}
+
+#------------------------------------------
+
+
 sub DESTROY()
 {   my $self = shift;
     my $imap = $self->imapClient;
@@ -430,18 +492,14 @@
 
 #------------------------------------------
 
-package Mail::IMAPClient::Debug;
-use vars '$VERSION';
-$VERSION = '2.055';
-
 # Tied filehandle translates IMAP's debug system into Mail::Reporter
 # calls.
-sub TIEHANDLE($)
+sub  Mail::IMAPClient::Debug::TIEHANDLE($)
 {   my ($class, $logger) = @_;
     bless \$logger, $class;
 }
 
-sub PRINT(@)
+sub  Mail::IMAPClient::Debug::PRINT(@)
 {   my $logger = ${ (shift) };
     $logger->log(DEBUG => @_);
 }

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/IMAP4.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/IMAP4.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/IMAP4.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -21,7 +21,7 @@
 
 =head1 DESCRIPTION
 
-****** UNDER DEVELOPMENT *****, cannot be used (yet)
+****** UNDER DEVELOPMENT *****, please help testing
 
 The IMAP4 protocol is quite complicated: it is feature rich and allows
 verious asynchronous actions.  The main document describing IMAP is
@@ -190,22 +190,19 @@
 The settings are used by L<login()|Mail::Transport::IMAP4/"Protocol [internals]"> to get server access.  The initial
 value origins from L<new(authenticate)|Mail::Transport::IMAP4/"METHODS">, but may be changed later.
 
-Available basic TYPES are C<CRAM-MD5> and C<PLAIN>.  The latter is sending
-username and password in plain text, and is therefore tried as last
-resort.
+Available basic TYPES are C<CRAM-MD5>, C<NTLM>, and C<PLAIN>.  With
+C<AUTO>, all available types will be tried.  When the Authen::NTLM
+is not installed, the C<NTLM> option will silently be skipped.  Be warned
+that, because of C<PLAIN>, erroneous username/password combinations will
+be passed readible as last attempt!
 
 The C<NTLM> authentication requires Authen::NTLM to be installed.  Other
 methods may be added later.  Besides, you may also specify a CODE
 reference which implements some authentication.
 
-When C<AUTO> is given, then C<CRAM-MD5>, C<NTLM> and C<PLAIN> are tried,
-in that specific order.  When the Authen::NTLM is not installed it
-will silently be skipped.  Be warned that, because of C<PLAIN>, erroneous
-username/password combinations will be passed readible as last attempt!
-
 An ARRAY as TYPE can be used to specify both mechanism as callback.  When
 no array is used, callback of the pair is set to C<undef>.  See
-L<Mail::IMAPCleint/authenticate> for the gory details.
+L<Mail::IMAPClient/authenticate> for the gory details.
 
 I<Example:> 
 
@@ -252,6 +249,14 @@
 
 =back
 
+$obj-E<gt>B<deleteFolder>(NAME)
+
+=over 4
+
+Remove one folder.
+
+=back
+
 $obj-E<gt>B<destroyDeleted>
 
 =over 4
@@ -279,6 +284,30 @@
 
 =back
 
+$obj-E<gt>B<flagsToLabels>(WHAT|FLAGS)
+
+Mail::Transport::IMAP4-E<gt>B<flagsToLabels>(WHAT|FLAGS)
+
+=over 4
+
+In SCALAR context, a hash with labels is returned.  In LIST context, pairs
+are returned.
+
+The WHAT parameter can be C<'SET'>, C<'CLEAR'>, or C<'REPLACE'>.  With the
+latter, all standard imap flags do not appear in the list will be ignored:
+their value may either by set or cleared.  See L<getFlags()|Mail::Transport::IMAP4/"Protocol [internals]">
+
+Unknown flags in LIST are stripped from their backslash and lower-cased.
+For instance, '\SomeWeirdFlag' will become `someweirdflag => 1'.
+
+I<Example:> translating IMAP4 flags into MailBox flags
+
+
+ my @flags  = ('\Seen', '\Flagged');
+ my $labels = Mail::Transport::IMAP4->flags2labels(SET => @flags);
+
+=back
+
 $obj-E<gt>B<folder>([FOLDERNAME])
 
 =over 4
@@ -314,9 +343,11 @@
 
 Returns the values of all flags which are related to the message with the
 specified ID.  These flags are translated into the names which are
-standard for the MailBox suite.  Names which do not appear will also provide
-a value in the return list: the negative for the value is it was present.
+standard for the MailBox suite.
 
+A HASH is returned.  Names which do not appear will also provide
+a value in the returned: the negative for the value is it was present.
+
 =back
 
 $obj-E<gt>B<getMessageAsString>(MESSAGE|UID)
@@ -359,6 +390,14 @@
 
 =back
 
+$obj-E<gt>B<listFlags>
+
+=over 4
+
+Returns all predefined flags as list.
+
+=back
+
 $obj-E<gt>B<login>
 
 =over 4
@@ -399,9 +438,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Transport::IMAP4-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Transport::IMAP4-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -549,7 +588,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/Mailx.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/Mailx.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/Mailx.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Transport::Mailx;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Transport::Send';
 
 use Carp;
@@ -54,7 +54,7 @@
     {   close STDOUT;
         { exec $program, @options, @to }
         $self->log(NOTICE => "Cannot start contact to $program: $!");
-        return 0;
+        exit 1;
     }
  
     $self->putContent($message, \*MAILER, body_only => 1);

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/Mailx.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/Mailx.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/Mailx.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -181,9 +181,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Transport::Mailx-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Transport::Mailx-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -334,7 +334,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/POP3.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/POP3.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/POP3.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -4,7 +4,7 @@
 
 package Mail::Transport::POP3;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Transport::Receive';
 
 use IO::Socket  ();
@@ -184,7 +184,7 @@
 {   my $self = shift;
 
     my $socket = $self->_connection;
-    return $socket if $socket;
+    return $socket if defined $socket;
 
     if(exists $self->{MTP_nouidl})
     {   $self->log(ERROR =>
@@ -230,7 +230,7 @@
     return unless OK($response);
 
     my @list;
-    local $_; # make sure we don't spoil it for the outside world
+    local $_; # make sure we don't spoil $_ for the outside world
     while(<$socket>)
     {   last if m#^\.\r?\n#s;
         s#^\.##;
@@ -256,8 +256,10 @@
 
 sub _connection(;$)
 {   my $self = shift;
-    my $socket = $self->{MTP_socket} or return undef;
 
+    my $socket = $self->{MTP_socket};
+    defined $socket or return undef;
+
     # Check if we (still) got a connection
     eval {print $socket "NOOP$CRLF"};
     if($@ || ! <$socket> )
@@ -276,7 +278,7 @@
 
 # Check if we can make a TCP/IP connection
 
-    local $_; # make sure we don't spoil it for the outside world
+    local $_; # make sure we don't spoil $_ for the outside world
     my ($interval, $retries, $timeout) = $self->retry;
     my ($host, $port, $username, $password) = $self->remoteHost;
     unless($username && $password)
@@ -306,9 +308,8 @@
     if($authenticate eq 'AUTO' || $authenticate eq 'APOP')
     {   if($welcome =~ m#^\+OK .*(<\d+\.\d+\@[^>]+>)#)
         {   my $md5 = Digest::MD5::md5_hex($1.$password);
-            my $response = $self->send($socket, "APOP $username $md5$CRLF")
-	        or return;
-            $connected = OK($response);
+            my $response = $self->send($socket, "APOP $username $md5$CRLF");
+            $connected = OK($response) if $response;
         }
     }
 
@@ -366,11 +367,14 @@
     if(OK($uidl))
     {   my @n2uidl;
         $n2uidl[$self->{MTP_messages}] = undef; # optimization, sets right size
+
+        local $_;    # protect global $_
         while(<$socket>)
         {   last if substr($_, 0, 1) eq '.';
-            s#\r?\n$##; m#^(\d+) (.+)#;
-            $n2uidl[$1] = $2;
+            s#\r?\n$##;
+            $n2uidl[$1] = $2 if m#^(\d+) (.+)#;
         }
+
         shift @n2uidl; # make message 1 into index 0
         $self->{MTP_n2uidl} = \@n2uidl;
         delete $self->{MTP_n2length};

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/POP3.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/POP3.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/POP3.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -354,9 +354,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Transport::POP3-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Transport::POP3-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -535,7 +535,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/Qmail.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/Qmail.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/Qmail.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Transport::Qmail;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Transport::Send';
 
 use Carp;
@@ -34,7 +34,7 @@
     if(open(MAILER, '|-')==0)
     {   { exec $program; }
         $self->log(NOTICE => "Errors when opening pipe to $program: $!");
-        return 0;
+        exit 1;
     }
  
     $self->putContent($message, \*MAILER, undisclosed => 1);

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/Qmail.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/Qmail.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/Qmail.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -154,9 +154,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Transport::Qmail-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Transport::Qmail-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -307,7 +307,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/Receive.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/Receive.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/Receive.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Transport::Receive;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Transport';
 
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/Receive.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/Receive.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/Receive.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -113,9 +113,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Transport::Receive-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Transport::Receive-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -252,7 +252,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/SMTP.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/SMTP.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/SMTP.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Transport::SMTP;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Transport::Send';
 
 use Net::SMTP;
@@ -148,14 +148,14 @@
 
         defined $server or next;
 
-        $self->log(PROGRESS => "Opened SMTP connection to $host.\n");
+        $self->log(PROGRESS => "Opened SMTP connection to $host.");
 
         if(defined $username)
         {   if($server->auth($username, $password))
-            {    $self->log(PROGRESS => "$host: Authentication succeeded.\n");
+            {    $self->log(PROGRESS => "$host: Authentication succeeded.");
             }
             else
-            {    $self->log(ERROR => "Authentication failed.\n");
+            {    $self->log(ERROR => "Authentication failed.");
                  return undef;
             }
         }

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/SMTP.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/SMTP.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/SMTP.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -259,9 +259,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Transport::SMTP-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Transport::SMTP-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -410,7 +410,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/Send.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/Send.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/Send.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Transport::Send;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Transport';
 
 use Carp;
@@ -13,7 +13,8 @@
 
 sub new(@)
 {   my $class = shift;
-    return $class->SUPER::new(@_) if $class ne __PACKAGE__;
+    return $class->SUPER::new(@_)
+       if $class ne __PACKAGE__;
 
     require Mail::Transport::Sendmail;
     Mail::Transport::Sendmail->new(@_);

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/Send.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/Send.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/Send.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -255,9 +255,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Transport::Send-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Transport::Send-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -408,7 +408,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/Sendmail.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/Sendmail.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/Sendmail.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Transport::Sendmail;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Transport::Send';
 
 use Carp;
@@ -34,9 +34,9 @@
     my $program = $self->{MTS_program};
     if(open(MAILER, '|-')==0)
     {   my $options = $args{sendmail_options} || [];
-        { exec $program, '-it', @{$self->{MTS_opts}}; }  # {} to avoid warning
+        { exec $program, '-ti', @{$self->{MTS_opts}}; }  # {} to avoid warning
         $self->log(NOTICE => "Errors when opening pipe to $program: $!");
-        return 0;
+        exit 1;
     }
  
     $self->putContent($message, \*MAILER, undisclosed => 1);

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport/Sendmail.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport/Sendmail.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport/Sendmail.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -170,9 +170,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Transport::Sendmail-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Transport::Sendmail-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -323,7 +323,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport.pm
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -3,7 +3,7 @@
 
 package Mail::Transport;
 use vars '$VERSION';
-$VERSION = '2.055';
+$VERSION = '2.060';
 use base 'Mail::Reporter';
 
 use Carp;

Modified: packages/libmail-box-perl/trunk/lib/Mail/Transport.pod
===================================================================
--- packages/libmail-box-perl/trunk/lib/Mail/Transport.pod	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/lib/Mail/Transport.pod	2005-03-30 18:00:59 UTC (rev 842)
@@ -219,9 +219,9 @@
 
 =back
 
-$obj-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+$obj-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
-Mail::Transport-E<gt>B<defaultTrace>([LEVEL, [LEVEL])
+Mail::Transport-E<gt>B<defaultTrace>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
 
 =over 4
 
@@ -358,7 +358,7 @@
 
 =head1 COPYRIGHTS
 
-Distribution version 2.055.
+Distribution version 2.060.
 Written by Mark Overmeer (mark at overmeer.net).  See the ChangeLog for
 other contributors.
 

Modified: packages/libmail-box-perl/trunk/scripts/mailbox2html
===================================================================
--- packages/libmail-box-perl/trunk/scripts/mailbox2html	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/scripts/mailbox2html	2005-03-30 18:00:59 UTC (rev 842)
@@ -241,7 +241,7 @@
     my $subject      = $message->head->get('subject') || '&lt;no subject&gt;';
     chomp $subject;
 
-    $message->setLabel
+    $message->label
      ( clean_id => $clean_id
      , filename => $filename
      , subject  => $subject

Modified: packages/libmail-box-perl/trunk/test.pl
===================================================================
--- packages/libmail-box-perl/trunk/test.pl	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/test.pl	2005-03-30 18:00:59 UTC (rev 842)
@@ -6,9 +6,11 @@
 use File::Spec;
 use File::Basename;
 
-use lib 'tests';
+use lib qw/tests lib/;
+
 use Config;
 use Tools;             # test tools
+use Mail::Reporter;    # to avoid 'too late for INIT'
 
 use IO::Dir;
 use Test::Harness qw($verbose);

Copied: packages/libmail-box-perl/trunk/tests/10reporter (from rev 840, packages/libmail-box-perl/branches/upstream/current/tests/10reporter)

Modified: packages/libmail-box-perl/trunk/tests/11field/20fast.t
===================================================================
--- packages/libmail-box-perl/trunk/tests/11field/20fast.t	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/tests/11field/20fast.t	2005-03-30 18:00:59 UTC (rev 842)
@@ -11,7 +11,7 @@
 use lib qw(. .. tests);
 use Tools;
 
-use Test::More tests => 68;
+use Test::More tests => 72;
 
 use Mail::Message::Field::Fast;
 use Mail::Address;
@@ -143,6 +143,12 @@
 is($p->attribute('newfield'), 'bull');
 is($p->comment, 'charset="us-ascii"; format="newform"; newfield="bull"');
 
+my %attrs = $p->attributes;
+cmp_ok(keys %attrs, '==', 3, "list of attributes");
+is($attrs{charset}, 'us-ascii');
+is($attrs{format}, 'newform');
+is($attrs{newfield}, 'bull');
+
 my $q = Mail::Message::Field::Fast->new('Content-Type: text/plain');
 is($q->toString, "Content-Type: text/plain\n");
 is($q->attribute(charset => 'iso-10646'), 'iso-10646');

Copied: packages/libmail-box-perl/trunk/tests/11field/40wrap.t (from rev 840, packages/libmail-box-perl/branches/upstream/current/tests/11field/40wrap.t)

Modified: packages/libmail-box-perl/trunk/tests/13body/40multip.t
===================================================================
--- packages/libmail-box-perl/trunk/tests/13body/40multip.t	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/tests/13body/40multip.t	2005-03-30 18:00:59 UTC (rev 842)
@@ -44,7 +44,7 @@
 cmp_ok($p1->body($b1) , "==",  $b1);
 is($p1->get('Content-Type'), 'text/html');
 is($p1->get('Content-Transfer-Encoding'), '8bit');
-ok(!defined $p1->get('Content-Disposition'));
+ok(! defined $p1->get('Content-Disposition'));
 
 my $h2 = Mail::Message::Head::Complete->new;
 

Modified: packages/libmail-box-perl/trunk/tests/14fieldu/10full.t
===================================================================
--- packages/libmail-box-perl/trunk/tests/14fieldu/10full.t	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/tests/14fieldu/10full.t	2005-03-30 18:00:59 UTC (rev 842)
@@ -222,4 +222,3 @@
     my $utf8_to = decode('iso-8859-1', $to);
     is($d->decode($from), $utf8_to);
 }
-

Modified: packages/libmail-box-perl/trunk/tests/14fieldu/30unstr.t
===================================================================
--- packages/libmail-box-perl/trunk/tests/14fieldu/30unstr.t	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/tests/14fieldu/30unstr.t	2005-03-30 18:00:59 UTC (rev 842)
@@ -26,7 +26,7 @@
        exit 0;
    }
    else
-   {   plan tests => 28;
+   {   plan tests => 30;
    }
 }
 
@@ -88,16 +88,14 @@
 
 my $d = $mmfu->new("d", "a\x{E4}b", charset => 'iso-8859-1');
 ok(defined $d,                          "Created d with included stranger");
-isa_ok($c, $mmfu);
+isa_ok($d, $mmfu);
 is($d->name, 'd',                       "Name of d");
 
-# encoding/decoding work in progress
-# is($d->unfoldedBody, '=?iso-8859-1?q?a=E4b?=', "Unfolded body d");
+is($d->unfoldedBody, '=?iso-8859-1?q?a=E4b?=', "Unfolded body d");
 
 my @dl = $d->foldedBody;
 cmp_ok(@dl, '==', 1,                    "Folded body of d");
 
-# encoding/decoding work in progress
-# is($dl[0], " =?iso-8859-1?q?a=E4b?=\n", "Folded d line 0");
+is($dl[0], " =?iso-8859-1?q?a=E4b?=\n", "Folded d line 0");
 
 is($d->decodedBody, "a\x{E4}b");

Copied: packages/libmail-box-perl/trunk/tests/14fieldu/31struct.t (from rev 840, packages/libmail-box-perl/branches/upstream/current/tests/14fieldu/31struct.t)

Modified: packages/libmail-box-perl/trunk/tests/40mbox/50create.t
===================================================================
--- packages/libmail-box-perl/trunk/tests/40mbox/50create.t	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/tests/40mbox/50create.t	2005-03-30 18:00:59 UTC (rev 842)
@@ -180,11 +180,11 @@
 die unless defined $folder;
 
 ok(-f File::Spec->catfile($top, "f4"),        'folder-file found');
-$folder->delete;                             # remove folder contents
-$folder->close;
+$folder->delete(recurse=>1);                  # remove folder contents
+$folder->close if defined $folder;
 
 ok(! -f File::Spec->catfile($top, "f4"),      'empty folder clean-up'); 
-ok(! -d File::Spec->catfile($top, "f4.d"),    'empty subfolder clean-up'); 
+ok(! -d File::Spec->catfile($top, "f4.d"),    'subfolder dir clean-up'); 
 
 #
 # Write a folder, but at the same place is a subdir.  The subdir should

Copied: packages/libmail-box-perl/trunk/tests/44imap/30flags.t (from rev 840, packages/libmail-box-perl/branches/upstream/current/tests/44imap/30flags.t)

Modified: packages/libmail-box-perl/trunk/tests/52manager/10open.t
===================================================================
--- packages/libmail-box-perl/trunk/tests/52manager/10open.t	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/tests/52manager/10open.t	2005-03-30 18:00:59 UTC (rev 842)
@@ -19,7 +19,7 @@
 
 my $manager = Mail::Box::Manager->new
  ( log      => 'NOTICES'
- , trace    => 'ERRORS'
+ , trace    => 'NONE'
  );
 
 my $folder  = $manager->open
@@ -37,12 +37,12 @@
  );
 
 ok(!defined $second,                             'open same folder fails');
-my @warnings = $manager->report('WARNINGS');
-cmp_ok(@warnings, "==", 1,                       'mgr noticed double');
+my @errors = $manager->report('ERRORS');
+cmp_ok(@errors, "==", 1,                       'mgr noticed double');
 
-$warnings[-1] =~ s#\\mbox\.win#/mbox.src#g;  # Windows
+$errors[-1] =~ s#\\mbox\.win#/mbox.src#g;  # Windows
 
-is($warnings[-1], "Folder folders/mbox.src is already open.\n");
+is($errors[-1], "Folder folders/mbox.src is already open.");
 cmp_ok($manager->openFolders, "==", 1,           'only one folder open');
 
 undef $second;
@@ -57,10 +57,10 @@
 ok(! -f $new,                                   'folder file does not exist');
 ok(! defined $n,                                'open non-ex does not succeed');
 
- at warnings = $manager->report('WARNINGS');
-cmp_ok(@warnings, "==", 2,                      'new warning');
+my @warnings = $manager->report('WARNINGS');
+cmp_ok(@warnings, "==", 1,                      'new warning');
 $warnings[-1] =~ s#\\#/#g;  # Windows
-is($warnings[-1], "Folder does not exist, failed opening mbox folder folders/create.\n");
+is($warnings[-1], "Folder does not exist, failed opening mbox folder folders/create.");
 
 $manager->log('WARNINGS');  # back to default reporting.
 $manager->trace('WARNINGS');

Copied: packages/libmail-box-perl/trunk/tests/52manager/20user.t (from rev 840, packages/libmail-box-perl/branches/upstream/current/tests/52manager/20user.t)

Copied: packages/libmail-box-perl/trunk/tests/52manager/30collect.t (from rev 840, packages/libmail-box-perl/branches/upstream/current/tests/52manager/30collect.t)

Copied: packages/libmail-box-perl/trunk/tests/60imap (from rev 840, packages/libmail-box-perl/branches/upstream/current/tests/60imap)

Modified: packages/libmail-box-perl/trunk/tests/Tools.pm
===================================================================
--- packages/libmail-box-perl/trunk/tests/Tools.pm	2005-03-30 17:54:13 UTC (rev 841)
+++ packages/libmail-box-perl/trunk/tests/Tools.pm	2005-03-30 18:00:59 UTC (rev 842)
@@ -229,6 +229,7 @@
 
 sub compare_lists($$)
 {   my ($first, $second) = @_;
+#warn "[@$first]==[@$second]\n";
     return 0 unless @$first == @$second;
     for(my $i=0; $i<@$first; $i++)
     {   return 0 unless $first->[$i] eq $second->[$i];




More information about the Pkg-perl-cvs-commits mailing list