man Email::FolderType::Register () - handles type registration for Email::FolderType
NAME
Email::FolderType::Register - handles type registration for Email::FolderType
SYNOPSIS
use Email::FolderType::Register qw[register_type];
register_type Ezmlm => sub { $_[0] =~ m!//$! };
DESCRIPTION
Provides the mechanism for registering folder types for Email::FolderType. Registers the folder type CW$name with a test, CW$test. Both parameters are required. The first parameter is a plain text name for a mail folder type. The second argument is a subroutine reference that's run as a test. If a test is successful - returning true - CWEmail::FolderType's CWfolder_type() function will return the corrisponding folder type name. If a test fails - returning false - the mail folder name is ignored.
It is suggested to register folder names as something that could be used in a Perl package name, for example, alpha-numeric names.
When a type is registered it is CWunshift()ed onto the top of the list of types to be tested.
SEE ALSO
Email::FolderType.
AUTHOR
Casey West <casey@geeknest.com>.
COPYRIGHT
Copyright (c) 2004 Casey West. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.