[Catalyst] HTML::Widget as_xml pretty print

Richard Jolly richardjolly at mac.com
Fri Apr 7 22:04:07 CEST 2006


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); }




More information about the Catalyst mailing list