On 7 Mar 2008, at 09:03, Alex Povolotsky wrote:
Martin Ellison wrote:
Is there anything attached to Catalyst similar to the CGI.pm
module? That is, creating the HTML by a series of procedure calls
rather than by instantiating a template?
Or is there some way to link up the existing CGI module? $c-
>response->body(ul(li(q{hello}), li(q{world})))) ?
Or is it not a good idea?
I couldn't find anything from a search, so excuse me please if this
has been covered before.
Creating HTML inside the code is the best way to make unreadable,
unmaintainable program with mysterious errors.
Alex.
There's always Template::Declare[0] which lets you do
template simple => sub { html { head {} body { p {'Hello, world wide
web!'} } } };
And keep the html in a sensible place (i.e. not in your controllers).
Never used it but i know Jon Rockway has so perhaps he can comment on
how useful it actually is.
-ash
[0]:
http://search.cpan.org/~sartak/Template-Declare-0.28/lib/Template/Declare.pm
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/