XML::Atom::SimpleFeed 0.8

Monday, 5 Jun 2006

I finally stuck a fork in XML::Atom::SimpleFeed and shipped it. It took ten entire months because I completely rewrote its innards no less than six times:

  1. First I switched it to inside-out object style and SAX-based output generation;
  2. then I reverted to a hash-based object where instead of storing all the data in instance variables, I generated SAX events immediately, with the option to buffer them in a spool which would eventually be played back to a real SAX writer – all this to cope with the fact that the API as designed wasn’t well suited for streaming output;
  3. then I got sick of SAX and stopped caring about streaming, but wanted a more declarative approach, so I designed a model based on XML::LibXML in which I cloned and walked pre-parsed XML snippets, dispatching based on attributes in a private namespace (talk about boiling the ocean);
  4. then I switched to a scalar reference for the object, to which I appended output from a CGI.pm instance that I had ritually abused to make it make my desired XML for me;
  5. until I had sickened myself enough that I resigned to writing my own minimal XML writer, around which time I also decided to restructure both the code and docs to closely follow the way the RFC 4287 document flows, which finally brought some clarity to the code layout;
  6. and lastly, I broke the 0.7 API to make it both simpler/prettier on the outside and saner to implement on the inside.

All this on a limited supply of spare tuits.

I need to work on not letting perfect be the enemy of good; it would have been much better to just ship something, anything, as soon as possible, rather than stagnate – if only seemingly – for almost a year.

But at long last, the CPAN has a module with which you can generate Atom 1.0 with minimal fuss. It took Long Enough. Share and enjoy.