Perlanet Update

Maybe it’s just me, but when I know that people are using my code it galvanises me into improving it. Following the discovery that people were actually using Perlanet, I’ve made quite a few releases over the last week or so. I thought people might be interested in what I’ve been doing.

Release 0.30 was a big one. I incorporated a lot of the improvements that Alex had made in his fork. Most important was probably switching to URI::Fetch instead of LWP::UserAgent. This means that we can now cache the feeds and only re-request them when they have changed.

Release 0.31 documented the caching feature. It also removed some annoying debugging output unless the program was running in a console. I also tweaked the output for failed requests and thereby introduced a nasty bug that wasn’t fixed for some days.

Release 0.32 added some better help for the ‘perlanet’ command line program and added a lot more of Alex’s fixes and improvements. I also tried running the code through both ‘perltidy’ and ‘perlcritic’ and made some changes based on their suggestions.

Release 0.33 featured a much improved test suite. It also fixed the nasty bug that I introduced in 0.31. If you were using a cache and a feed hadn’t changed from the previous request then it wasn’t processed at all. I found this bug whilst working on the test suite. Testing is good, boys and girls!

Release 0.34 went out in the last hour. Overnight I got a bug report about the caching support. I’ve been using CHI to provide caching, and because not everyone wants to use caching I had marked it as an optional dependency in Build.PL. But I was loading it in the code whether or not it was being used. So if you didn’t have it installed, Perlanet didn’t work at all. I’ve now made it truly optional – it’s only loaded if required. And if you try to use caching but don’t have CHI installed everything still works – just without a cache.

That got me thinking. And the version currently in github applies the same principle to OPML support using XML::OPML::SimpleGen. Not everyone wants to generate an OPML file, so I shouldn’t force everyone to install that module. That will be in release 0.35 which will go out in the next couple of days. I’m also thinking of doing the same for the HTML::Tidy[1] and HTML::Scrubber support.

I still have some more of Alex’s patches to apply. But I’m considering how to make things like filter support into an optional add-on. I’ve tried to get some discussion of these features going on the Perlanet mailing list. If you’re interested in Perlanet, please subscribe to the list and get involved in the discussions.

[1] I should point out that Perlanet already has support for HTML::Tidy, but installing HTML::Tidy is a bit of a black art currently. The RT queue seems to imply that the module has been abandoned. Does anyone want to offer to take it over from Andy?

Leave a Reply