mr_stru has asked for the wisdom of the Perl Monks concerning the following question:
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Module naming advice
by halley (Prior) on Aug 11, 2003 at 15:50 UTC | |
by mr_stru (Sexton) on Aug 12, 2003 at 01:40 UTC |