use Mail::Box::Maildir; my $folder = new Mail::Box::Maildir folder => $ENV{MAIL}, ...;
See SYNOPSIS in Mail::Box::Dir
This documentation describes how Maildir mailboxes work, and what you
can do with the Maildir folder object Mail::Box::Maildir
.
Maildir is not supported for Windows, because it create filenames which are not accepted by the Windows system.
See DESCRIPTION in Mail::Box::Dir
The explanation is complicated, but for normal use you should bother yourself with all details.
Maildir-type folders use a directory to store the messages of one folder. Each message is stored in a separate file. This seems useful, because changes in a folder change only a few of these small files, in contrast with file-based folders where changes in a folder cause rewrites of huge folder-files.
However, Maildir based folders perform very bad if you need header information of all messages. For instance, if you want to have full knowledge about all message-threads (see Mail::Box::Thread::Manager) in the folder, it requires to read all header lines in all message files. And usually, reading your messages as threads is desired. Maildir maintains a tiny amount of info visible in the filename, which may make it perform just a little bit faster than MH.