Read it and weep: XML::RSS now has full test coverage - in the Subversion trunk at least, but coming to a CPAN mirror near you. On the day after my last update, I spent some time increasing the test coverage, and ran into a few dillemas with which I had to consult Ask. He indeed provided some useful advice.
Yesterday (and a bit before) I spent some time on further increasing the test coverage - this time mainly in the parsing stage. I had to modify the core code slightly to allow for better coverage, and to fix some bugs that were caused by that. Here are some things I discovered in the process that may prove useful:
It is actually possible to have an XML element of an undefined XML namespace inside a document with a default defined namespace. To do that one can use the attribute xmlns="" on an element.
XML::RSS had a check for such a case and I needed to verify that it is actually possible.
One can update a Devel::Cover database incrementally by using the following pattern:
# Run the test script.
# You can also use prove instead of runprove
HARNESS_PERL_SWITCHES="-MDevel::Cover" runprove --blib t/0.9-strict.t
# Update the display.
From some reason, however, Devel::Cover sometimes forced me to use "cover -delete" and run all the test scripts through it again, but still this pattern can sometimes be a huge time saver.
The script items-are-0.t which I wrote when I started to bug-fix the
"values equal 0" bug, and continued to implement various RSS generation tests
there, itself yields a total coverage of 88.5%. And it is larger and has
more line than the XML::RSS
I initially wanted to give some statistics about the code and the tests, but I think it would be a waste of time, and you can always calculate them by checking out the code from the repository. Next on my agenda is to refactor the code, fix rt.cpan.org bugs, and possibly also enhance it a bit. XML::RSS uses a lot of hard-coded maps implemented as hash tables and I'd like to make them more customisable.