[Catalyst] HTML::Widget as_xml pretty print

Sebastian Riedel sri at oook.de
Sat Apr 8 08:14:07 CEST 2006


07.04.2006 22:04 Richard Jolly:

> Hi,
>
> HTML::Widget's as_xml function doesn't indent, which is hard on the
> eyes during development. It's trivial to patch[0] to run the output
> through XML::LibXML, but I don't much want to have a locally patched
> copy, and I'm not sure if this is the best solution for others.
>
> Does this effect others?
>
> And more generally, I'm wondering what best practice/common usage is.
> I've just started with it, and I'm not sure if I should generate whole
> forms with as_xml, or use the elements in TT separately. I'm not doing
> a programmatically generated crud view, but it's not fantastically
> complicated either.
>
> Richard
>
> [0] sub as_xml_pp { XML::LibXML->new()->parse_string( (shift)->as_xml
> )->toString(1); }

Maybe there should be a pretty print option, but XML::LibXML is not a  
very good prereq, because of it's libxml2 dependency.


--
sebastian




More information about the Catalyst mailing list