I wrote a dinky Mac::PropertyList a while back because I needed to read (not write) some property list files. It worked, but only enough to get my job done. Still, I released early and forgot about the often.
Now, I want to play with iPhoto's AlbumData.xml, a property list file that does not end in .plist. I rewrote most of Mac::PropertyList so that everything is an object and there is all sorts of polymorphism and other big words going on. With a couple of tweaks of the tests, everything worked. Indeed, I thought I must have screwed up the tests since things were not failing enough.
A lot of the classes are empty packages, and a lot of magic happens based on the package name. I still need to work on the interface a bit to hide all of the shenanigans that go on behind the scene---nothing black magic-like, just tedious in the way that XML modules can be ($foo->tag1->tag2->some_other_tag->value1->value2->another _tag->get_node->no_the_other_node->tag1_again->value). For instance, adding to an array or dict is a pain because the element has to be another object, but that is too much for the programmer to have to think about. On the other hand, the module needs to know how to automagically objectify things given the various types defined in the DTD. That's two sets of competing goals to satisfy, and I want the first one to win.
I haven't committed to CVS yet because I don't have a method to do that yet. I need to get the files over to a machine that can handle that. I have the machines, but I think I am going to have to tar up my working directory, scp it to that machine, untar it, and hope there are no conflicts before I commit. I'm still working out the details of that (see previous journal entry).