Don’t Be Afraid to Drop the SOAP

Ok, I know that linking to two articles from the same source in a row is bad, but I don’t do it so often, so here it goes…

Perl.com has this article called “Don’t Be Afraid to Drop the SOAP” where Sam Tregar (the guy from about.com, the author of HTML::Template, HTML:: Pager, Inline::Guile, Devel:: Profiler and few others) explains why he had to drop SOAP from the application and go for something handmade. That is an interesting story that shows a number of goods and bads of SOAP as a part of solution to one specific problem.

FMTYEWTK About Mass Edits In Perl

There is a very usefule article on Perl.com – “FMTYEWTK About Mass Edits In Perl“. It is about making changes in a bunch of files using a simple Perl script, or a one-liner, or even straight from command line. All the information is old, but it is nicely collected in one single article, which can come handy pretty often.

FMTYEWTK stands for Fare More Than You Ever Wanted To Know, by the way.

Critique of Where Perl 6 is Heading

There is an article at FreshMeat.net that talks about Perl 6 and the way the development is going. The author is mostly against this way. The article is followed by a number of comments both in favour and against of the points stated. There is also another discussion at PerlMonks if you are interested.

I do have my doubts about Perl 6 too, but I havent’ yet looked into it seriously. Perl 5 is way more than enough for me and I don’t see myself changing to anything any time soon. I’ll let you know if I’ll change my mind of course.

Sending a hash to perl’s scalar function

While writing a test suite for one of my applications today, I came across an interesting result. Perl’s scalar function, if given a hash as an argument, will return something like “2/8” or “5/16”. Results can be identical for different hashes. There is no obvioius trend in changing of these results. As it turned out, scalar(%hash) returns information about hash buckets. The first number indicates the number of occupied buckets in the hash storage and the second number indicates the total number of buckets allocated.

I wasn’t sure in my guess, until I got a confirmation from Perl monks, which also pointed me to the “man perldata” bit describing the result.

timestamp_image

This is yet another script to deal with images from digital cameras. It will scale (resize preserving the width to height ratio) down the image to the size you’ve specified and annotate (write on top of the image) it with date time taken from EXIF header of the image. Font face, size and color are configurable. Modified images will be saved with different name (as specified by the prefix variable inside the script).

This script is written in perl. It works with Image::Magick module and jhead program (since Image:EXIF failed to compile on my machine).

timestamp_image.pl