Mail::SimpleList and Mail::TempAddress grew out of the same base idea: an e-mail can be an RPC call to a remote program. Consequently, they share quite a bit of code.

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.


In reply to Naming a Mail Action Module by chromatic

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.