Paul Cochrane bio photo

Paul Cochrane

Twitter LinkedIn Github

In the first installment of my participation in the CPAN Pull Request Challenge I was assigned the module XML::NamespaceSupport. The module enables one to process namespaced XML names from within an application and was based upon SAX2’s NamespaceSupport class. It’s a stable module with little more that needs to be developed since the SAX2 NamespaceSupport class is also very stable. Nevertheless, there were still things to do. Fortunately, the maintainer (PERIGRIN) was very responsive and helpful, which meant that pull request ideas could be refined before implementation went on any wild goose chases.

What needed to be done? Here’s a quick overview:

  • minor cleanup in the dist.ini file. Such things like updating the copyright year and getting the Git::Tag Dist::Zilla plugin to use the project’s current tag format.
  • fix an error message issue mentioned in RT#2346, where one must have at least one context on the namespace stack before attempting to get any declared prefixes. Extra docs were added as well as a test for the new behaviour.
  • fix minor pod issues such as typos, closing parentheses, URL links etc.
  • fix an error message to correctly reflect behaviour.
  • add a Travis-CI configuration.
  • convert the README to markdown format.
  • add tests for previously untested methods.
  • minor other fixups such as ignoring automatically generated files, removing the executable bit from files which didn’t need it and add an indirect author dependency in dist.ini to a Pod::Weaver plugin (Pod::Weaver plugins aren’t found by dzil authordeps).

Altogether, these changes added up to 11 pull requests. I tend to submit small, atomic pull requests so that the author/maintainer has less code to review per PR and rejected PRs aren’t a big problem. One cool thing about all of the PRs is that potentially all RT tickets for the module could be marked as resolved.

As I write this, not all PRs have been merged and an updated version of the module has not yet been released. Nevertheless, when one realises (AFAICT) that the maintainer has a family, is active in scouting, has a job, and works on open source projects, it’s obvious that time is in short supply. As such, it’s impressive that there is time left over at all for open source! Thanks PERIGRIN for your time and your help!

  • P.S. just in case you’re wondering what I mean by “cage” in the title, this is a reference to the Parrot Cage Cleaners in which team I used to be a member. The idea with the Cage Cleaners was to keep project entropy and technical debt low by “keeping the cage clean”. I’m now just transferring the concept to the CPAN PR Challenge :-)