[Catalyst] Beginner question: View directory

Jonathan Rockway jon at jrock.us
Thu Nov 8 04:06:29 GMT 2007


Gerda Shank wrote:
> I'm trying to learn  Catalyst by working my way through the tutorial
> and other docs, and I'm a little puzzled by the View directory. In the
> tutorials it only has a TT.pm file in it, which is a config file for
> Template Toolkit. Are there ever any other kinds of files in that
> directory? The files that would be considered views in other MVC
> frameworks (the .tt files, I guess) are put into the root/src and
> root/lib directories instead of the View directory. Why? 

You might have view in addition to your TT view.  First off, not
everyone uses TT as a templating language (see Mason, HTML::Template,
Template::Declare, etc.).  Secondly, you can have more than one view;
consider the case of RSS feeds, Email, JSON, XML, etc.  I recommend a
search for "Catalyst::View" on the CPAN for more details.

Regards,
Jonathan Rockway



More information about the Catalyst mailing list