Reviews by Jos Boumans

cpanratings
 

RSS

Mail-Box (2.069)

[This review was actually for cpanratings.perl.org/dist/MailTools, but accidentally placed in the Mail::Box section. Follow the link for a rated review]

Jos Boumans - 2007-01-07T06:20:37 (permalink)

3 out of 8 found this review helpful. Was this review helpful to you?  Yes No

MailTools (1.74) **

[Original review at: cpanratings.perl.org/dist/Mail-Box but for the wrong distribution. Copied for convenience]

This bit of review is specifically about Mail::Mailer (read the docs here: search.cpan.org/~markov/MailTools-1.6....

Mail::Mailer has 'interesting' ideas about how to determine the from address of an email you try to send.

Assume the following code:

$mailer = Mail::Mailer->new( 'smtp', Server => 'smtp.mydomain.com');

$mailer->open({ From => 'user@mydomain.com', ... });

Here's what it does.
* The user your mailing from is the user running the program

* .... unless you set $ENV{USER}, then that is used (undocumented in Mail::Mailer)
* The domain your mailing from is determined with clever heuristics:

* Look for a sendmail.cf file and extract DH parameter

* Look for a smail config file and usr the first host defined in hostname(s)

* Try an SMTP connect (if Net::SMTP exists) first to mailhost then localhost

* Use value from Net::Domain::domainname (if Net::Domain exists)

Which goes spectacularly wrong in most cases, especially if you're using 'mybox.mydomain.com' and using 'smtp.mydomain.com' for outgoing mail.

Of course all this could have been avoided if you set the proper environment variables,
which again are NOT DOCUMENTED anywhere in Mail::Mailer.

Turns out however that Mail::Mailer uses Mail::Util (not referenced in either the documentation or even the /source/ of Mail::Mailer). Had you found this pod, it would have told you could have set the environment variables 'MAILDOMAIN' and 'MAILADDRESS',
and then it would have used those to construct the 'from' address.

But /why/? I already provided the From in the arguments to 'open', which tells me i can pass all email-headers in! As from the Mail::Mailer documentation:

$mailer->open(\%headers);

Anyone looking at Mail::Mailer for sending mail, may I suggest Email::Send, Net::SMTP or even Mail::Sendmail?

Jos Boumans - 2007-01-07T06:18:14 (permalink)

6 out of 6 found this review helpful. Was this review helpful to you?  Yes No

Data::Str2Num / Data-Str2Num (0.03) *

So the distribution is called 'Data-Str2Num-0.03', the module is called Data::Str2Num, but the pod is all in Data::Str2int (note the lowercasing on int).

Aside from his usually horrible pod, the author has actually managed to only miss one thing in this distribution:

The fact that perl already /does/ this.

Jos Boumans - 2003-09-15T13:43:15 (permalink)

1 out of 1 found this review helpful. Was this review helpful to you?  Yes No

Text-Replace (0.02) *

Wow, what a way to /not/ make a CPAN distribution.

First of all, it bundles all kinds of prerequisite modules, rather than declaring them prerequisites in the Makefile.PL. What a great way to make sure older modules will install older versions of your dependencies.

So next, the module itself actually has no documentation. Instead, it's tucked away in /another/ module, that seems to have no relevance to the whole project whatsoever, called 'Test::STD::STDutil'.
Now, most of this 'documentation' (and yes, it pertains to Text::Replace) actually has notes that it is 'Coming Soon', so it's not actually quite clear what it's supposed to do.

Basically, it's Yet Another Templating System, but so poor, that it could have been done better using perl's builtin s/// operator.

If you're looking for a templating system symilar to this, but actually quite usable, take a look at Text::Template instead.

Jos Boumans - 2003-09-15T13:35:36 (permalink)

2 out of 2 found this review helpful. Was this review helpful to you?  Yes No