in reply to object-oriented XML generation

2¢ worth: use XML::LibXML instead. You can validate against a DTD which describes the required elements/attributes/structure and it's already object oriented.

You can use Moose to wrap up a LibXML object too letting it handle the XML stuff only and doing your dispatch data handling with your own object stuff. Moose isn't trivial to jump into but it's very powerful and many projects that seem straightforward up front end up being much more complex and if you bake in a simplistic approach and it ends up growing complex you'll regret it.

Replies are listed 'Best First'.
Re^2: object-oriented XML generation
by metaperl (Curate) on Apr 15, 2009 at 22:15 UTC
    I cannot make heads of tails of XML::LibXML ... I simply dont understand where it's coming from.
    You can use Moose to wrap up a LibXML object
    Let me take this moment to pimp Perigrins module XML::Toolkit - it looks pretty wild.. somewhat alpha at the moment. But it's definitely moose-based.

      Yeah, it took me quite awhile to dive the LibXML docs and get a real feel for it. It’s easier/better than it seems from a first read of the docs; which are actually pretty good but quite spread out and without any "narrative."

      XML::Toolkit is interesting looking. Thanks for bringing it up.