Quick notes on some Perl gems

Posted on September 2, 2006

As I mentioned yesterday, a few packages caught my attention during the last few days at YAPC and yesterday during the afternoon and evening I took advantage of it being a lighter day (conference-wise) and decided to check out two of them.

First off a took a look at Plagger. Now instead of using the handy pre-packaged versions out there, I went the “fanatic CPAN hardcore user” way (as the author puts it) and let me tell you, you have to have at least some degree of fanaticism to go through with it alright! Oh and it is true what was said during the conference: installing Plagger –the CPAN way– sure does keep your computer warm! :-)

But hey, I got through with it and then it was all a matter of trying out a few configuration recipes to get the hang of things and after that mashing some options together to see how it all worked out.

And let me tell you, it works out beautifully! Plagger is so powerful it is hard to describe and the plugin system wins out yet again. You can setup an aggregator to feed you news and events to your email in a couple of minutes, full of bells and whistles. Oh and doing a “plannet” type of site couldn’t be easier! Put that together with a myriad notification systems (IRC, Growl, …) and a powerful filtering system and, well, it really rocks!

The only problem I see with it is that you do have to occasionally look at the source code of some modules to really understand what’s going on there and what you can actually do with them. Documentation is something that this project sorely needs and I fear that until there is such documentation it will continue to be mostly the province of Perl hackers!

If you wish to take a look at the presentation on the subject given at YAPC, you can find it here and be sure to check out the neat examples which work (almost!) out of the box.
Also check out the architecture of the thing, it really helps you figure out how to use things to create the specific aggregator you wish.

The other piece of Perl I tried out yesterday was KinoSearch.

I’ve had the need for search on a site come up a little while ago but hadn’t yet had the opportunity of going through the available modules on CPAN and now it seems like I won’t need to. Yay YAPC! :-)

I was fortunate enough to attend two talks on the subject and from the first one I got the feeling that there were two packages which could possibly interest me –Search::Xapian and KinoSearch. It seems like Search::Xapian is the more powerful of the two but it lacks in documentation and is really hard to use.

Then there was the second talk which focused specifically on KinoSearch and I was amazed at what I saw there, so I decided to go and try it out.

Installing it was a breeze (straight out of CPAN, of course) and using it was ridiculously easy!
I mean, I just copied and pasted the examples straight out of perldoc, tweaked what I needed to in order for my case to work (fortunately I have a fairly up-to-date copy of the site on my laptop), ran it and voilá! A fully working (fast!) index of the whole site!

Now of course they were right in the presentation when they said it can be a bit of a hog when it comes to disk space –it took 2.6M to index a full 2.7M of text!!– but then I used it straight out of the examples so maybe I can get it to be a bit more civil disk space-wise with a bit more tweaking…

And now to get some breakfast, pack my stuff and go out to see a bit more of the city until it is time to get on the train to Stratford for the rest of the vacation. Oh I see it’s raining quite a bit out there… How very typical! :-)