Alex Vandiver > Net-IMAP-Server-1.01 > Net::IMAP::Server::DefaultModel

Download:
Net-IMAP-Server-1.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source   Latest Release: Net-IMAP-Server-1.25

NAME ^

Net::IMAP::Server::DefaultModel - Encapsulates per-connection information about the layout of IMAP folders.

DESCRIPTION ^

This class represents an abstract model backend to the IMAP server; it it meant to be overridden by server implementations. Primarily, subclasses are expected to override "init" to set up their folder structure.

METHODS ^

new

This class is created when the client has successfully authenticated to the server.

init

Called when the class is instantiated, with no arguments. Subclasses should override this methtod to inspect the "auth" object, and determine what folders the user should have. The primary purpose of this method is to set "root" to the top level of the mailbox tree. The root is expected to contain a mailbox named INBOX.

close

Called when this model's connection closes, for any reason. By default, does nothing.

split PATH

Utility method which splits a given PATH according to the mailbox seperator, as determinded by the "seperator" in Net::IMAP::Server::Mailbox of the "root".

lookup PATH

Given a PATH, returns the Net::IMAP::Server::Mailbox for that path, or undef if none matches.