10 useful modules you might not have used recently

gav on 2003-05-31T02:15:59



  1. XML::Twig: Perlish way to parse XML, twig_handlers make it easy to process XML as records.


  2. Email::Valid: The easy way to check an email address.


  3. Data::FormValidator: Quick and simple way to validate a set of paramaters in a CGI.


  4. Time::Piece::MySQL: Adds handy MySQL specific functions to the ever-so-handy Time::Piece


  5. Text::ParseWords: When you have to split a string and worry about quotes.


  6. Mail::Sendmail: Because it's a mail sending module that I can remember the interface to.


  7. Proc::PID_File: The lazy way to find out if you're already running.


  8. HTML::TagFilter: Sanatize HTML, keeping only "safe" tags.


  9. Data::Page: Say goodbye to those embarassing off-by-one errors.


  10. Clone: Make a deep clone of a variable or add a clone method to your class.



Thanks, I love these lists...

runrig on 2003-05-31T14:44:45

I almost always find out about a module or two I didn't know about. I don't do much web work, mostly automation/background processing stuff, and that Proc::PID_File would make a much simpler replacement for some of the "Am I already running" stuff I've written. At least what I've written is better than the "grep the output of ps -ef for $0" stuff that I've seen :-) It might be useful though, to allow sending in the pid of a parent process, so that already deployed shell scripts can pass in their pids to a simple perl script and I can get rid of those godawful 'ps -ef | grep $0' in the shell scripts.

As for sending mail, I tend to use Mail::Sender, because it makes sending attachments easy (and I use it whether or not I'm sending attachments), and when I was looking for such a module, and it came up before MIME::Lite (searching for 'mail attachments' on search.cpan.org).