Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Module naming advice

by mr_stru (Sexton)
on Aug 11, 2003 at 11:55 UTC ( #282827=perlquestion: print w/replies, xml ) Need Help??
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 => '', b_site => '', ); my $f2m = Foo2Mail->new( fetch => \&fetch, to_fetch => \%to_fetch, to => '', from => '', 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



Replies are listed 'Best First'.
Re: Module naming advice
by halley (Prior) on Aug 11, 2003 at 15:50 UTC
    That function (parameterized mail content) has long been referred as 'Mail Merge' by the word processing and secretarial types.

    Of course, I cringe at the onslaught of spam e-mails generated by the module.

    [ e d @ h a l l e y . c c ]

      I guess is is mail merge. I am on the other hand hesitant to call it Mail::Merge as that rather implies it does mail merge in the word processing sense which isn't true. It's much more generic that that.

      And yup, I'm sure you could use it to spam people. But then the same is true of MIME::Lite, Mail::Mailer or the handily named Mail::Bulkmail. If the only application of the module was spam then you might have a point but as this isn't the case I don't see why this is relevant to the question.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://282827]
Approved by benn
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2018-05-24 03:22 GMT
Find Nodes?
    Voting Booth?