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.
"register_type($name, $test)"
Registers the folder type $name with a test, $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 - "Email::FolderType"'s "folder_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 "unshift()"ed onto the top of the list of types to be tested.
SEE ALSO
Email::FolderType.
AUTHOR
Casey West <[email protected]>.
COPYRIGHT
Copyright (c) 2004 Casey West. All rights reserved.This module is free software; you can redistribute it and/or modify itunder the same terms as Perl itself.