[Catalyst] Re: Catalyst without template

John Napiorkowski jjn1056 at yahoo.com
Thu May 17 17:44:30 GMT 2007


--- "A. Pagaltzis" <pagaltzis at gmx.de> wrote:

> * Dmitri Pissarenko <dmitri.pissarenko at gmail.com>
> [2007-05-17 17:00]:
> > sub buttonPressed : Local {
> >    my ( $self, $c ) = @_;
> > 
> >    my $name     = $c->request->params->{name};
> > 
> >    $c->res->write("Hello " . $name . ", welcome to
> the world of Dojo!\n");
> > }
> 
> Don’t do that, it leads to spaghetti. Write your
> own View class
> and generate the output from there.
> 
> Regards,
> -- 
> Aristotle Pagaltzis // <http://plasmasturm.org/>

Might want to check out the Catalyst view for Template
Declare mentioned earlier on this list at:
http://www.mail-archive.com/catalyst@lists.rawmode.org/msg05252.html

Good for when you you want to quickly put together
screens for debugging or for simply stuff.  That way
you can avoid the effort of getting TT setup and
hacking templates.  I've also used HTML::Tree for this
in the past, when I didn't want all the power of TT. 
Not sure if I'm convinced about using it for lots of
pages, but choice of Templating is pretty personal so
I won't try to start a flame war.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Catalyst mailing list