Subject: | better MH folder detection |
Date: | Mon, 11 Aug 2008 08:40:36 -0300 |
To: | bug-Email-FolderType [...] rt.cpan.org |
From: | David Bremner <bremner [...] unb.ca> |
At the moment Email::FolderType seems to have no way other than the
name to detect MH folders. What about something like the following?
package Email::FolderType::MH;
sub match {
my $folder = shift;
return 0 if (! -d $folder);
opendir DIR,$folder || error("opendir failed");
while (<DIR>){
return 0 if (!m|\.| && !m|\.\.| && !m|\d+|);
}
return 1;
}