I've got some code kicking around that I'd like to package up and release. The only problem is the name (and I'm also not sure how generally useful it is).

At the moment the module glories under the name Foo2Mail and works like this:

use Foo2Mail; # use LWP::Simple::get to fetch from url # use quick year/month/day date as id sub fetch { my ($self, $name, $target) = @_; my $content; if ($content = get($target)) { return { name => $name, content => $content, id => (localtime())[5,4,3], }; } else { $self->error('Failed to fetch $name ($target)'); return undef; } } my %to_fetch = ( a_site => 'http://example.com/example.html', b_site => 'http://example.com/example2.html', ); my $f2m = Foo2Mail->new( fetch => \&fetch, to_fetch => \%to_fetch, to => 'user@example.com', from => 'f2m@example.com', subject => 'Foo2Mail output', ) or die $Foo2Mail::ERROR

Essentially it allows you to specify a hash of information about data to be turned into emails, a sub to transform that into suitable content and then it generates and sends mails keeping track of what's been sent and only sending things once.

Given that it deals with Mail I imagine it should go into the Mail heirarchy somewhere but I can't think of a useful name so I thought I'd ask here for suggestions.

If you want to look at it then it's available from exo.org.uk

Ta

Struan


In reply to Module naming advice by mr_stru

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.