Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Shlomi Fish (918)

Shlomi Fish
  shlomif@iglu.org.il
http://www.shlomifish.org/
AOL IM: ShlomiFish (Add Buddy, Send Message)
Yahoo! ID: shlomif2 (Add User, Send Message)
Jabber: ShlomiFish@jabber.org

I'm a hacker of Perl, C, Shell, and occasionally other languages. Perl is my favourite language by far. I'm a member of the Israeli Perl Mongers, and contribute to and advocate open-source technologies. Technorati Profile [technorati.com]

Journal of Shlomi Fish (918)

Tuesday October 24, 2006
04:12 PM

XML::RSS Meta Bug

[ #31411 ]

So I continued working on XML::RSS. Then I encountered this bug. Essentially it complains about the fact that one cannot put "0" as the value of many elements. This was caused by statements such as if ($self->{channel}->{title}) that rejected the values "0", the empty string, etc. The attached patch converted it to ne '', but that was not a good solution because it would accept undef, and reject the empty string. Plus, the patch did not contain a test suite.

So I had to go over all the places in the code and write a patch that will add suitable test cases, and then fix the problem. One problem I encountered was that the default values of the fields were initialised as the empty string, which was accepted by if (defined(...)) and I had to convert them to undef (one by one).

So, 61 SVK commits, 88 individual tests, 1390 lines of the test file, and 4 days later, I fixed all these cases, and submitted a patch. Working on it proved to be fun in a braindead kind of way. I kept feeling that I want to work on it, like I was addicted to some bad drug. But now it's over.

On the plus side, I was able to refactor some of the XML::RSS code in the process, and also found a way to create Test::Run targets into a Makefile.PL+ Test::Manifest setup.

In other news:

  1. Someone reported that he could not install Error.pm using CPAN.pm. Turns out he had Module::Build as the default and ran into this bug, which I reproduced, isolated and reported.
  2. Trying to subscribe to the XML-RSS Request Tracker traffic caused me to run into a strange rt.cpan.org bug

And with this hopeful tone - good bye, and happy hacking.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.