Naming a Mail Action Moduleby chromatic (Archbishop)
|on Oct 31, 2003 at 20:24 UTC||Need Help??|
I've been refactoring the commonalities into a parent module. It needs a good name, though. My best idea so far is Mail::Command, though it's not completely satisfying. Mail::Action came to mind while writing the title. It's not bad.
Is there a better title?
Update: Here's a brief overview of the parent module.
new creates a new object containing a storage object and a Mail::Internet object representing the incoming message. Two accessor methods, addresses and message allow retrieving these objects.
address_field retrieves and cleans an address or list of addresses from a message field.
find_command looks for a command in the subject of the message and checks that the current object can handle that command.
reply sends a response message.
copy_headers copies message headers from an incoming message to an outgoing message.
process_body processes directives found in the body of a message, based on what the current address object can handle.
command_help responds to a help request with the "how to use this module" section of the documentation.
I'll probably also refactor out commonalities of the storage module and the actual address modules into two other parent classes. See Mail::SimpleList::Aliases versus Mail::TempAddress::Addresses and Mail::SimpleList::Alias versus Mail::TempAddress::Address, respectively.