Email::FolderType::MH 0.812 review

Download
by rbytes.net on

Email::FolderType::MH is a Perl class to help Email::FolderType recognise MH mail directories. SUBROUTINES folder_type < path

License: Perl Artistic License
File size: 11K
Developer: Simon Wistow
0 stars award from rbytes.net

Email::FolderType::MH is a Perl class to help Email::FolderType recognise MH mail directories.

SUBROUTINES

folder_type < path >

Automatically detects what type of mail folder the path refers to and
returns the name of that type.

It primarily bases the type on the suffix of the path given.

Suffix | Type
--------+---------
/ | Maildir
/. | MH
// | Ezmlm

In case of no known suffix it checks for a known file structure. If that
doesn't work out it defaults to "Mbox" although, if the "Mbox" matcher
has been overridden or the default changed (see DEFAULT MATCHER below)
then it will return undef.

matchers
Returns a list of all the matchers available to the system.

DEFAULT MATCHER

Currently the default matcher is "Mbox" and therefore it is always
checked last and always returns 1.

If you really want to change this then you should override
"Email::FolderType::Mbox::match" and/or change the variable
$Email::FolderType::DEFAULT to be something other than 'Mbox'.

use Email::FolderType;
use Email::FolderType::Mbox;

$Email::FolderType::DEFAULT = 'NewDefault';

package Email::FolderType::Mbox;
sub match { return (defined $_[0] && -f $_[0]) }

package Email::FolderType::NewDefault;
sub match { return (defined $_[0] && $_[0] =~ m!some crazy pattern!) }
1;

Requirements:
Perl

Email::FolderType::MH 0.812 search tags