[Catalyst] Beginner question: View directory

Dave Rolsky autarch at urth.org
Thu Nov 8 05:16:17 GMT 2007


On Thu, 8 Nov 2007, Kieren Diment wrote:

> TT.pm is the file that contains the programming logic for rendering your 
> view.  You can do stuff like set http headers, automatically add stuff to the 
> stash/session/whatever and co in here.  It inherits from Catalyst::View::TT

The View subclass for your app is _not_ the place to do those things. They 
should be done in your controllers. I can imagine doing some header 
setting in the view, primarily the content type, but I would imagine most 
other headers are better off being set in the controller.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/



More information about the Catalyst mailing list