L<Catalyst::Response|Catalyst::Response>, and
L<Catalyst::Request|Catalyst::Request>)
-C<$c->response->body> sets the HTTP response (see
-L<Catalyst::Response|Catalyst::Response>), while C<$c->welcome_message>
+C<$c-E<gt>response-E<gt>body> sets the HTTP response (see
+L<Catalyst::Response|Catalyst::Response>), while C<$c-E<gt>welcome_message>
is a special method that returns the welcome message that you saw in
your browser.
This creates the C<lib/Hello/View/TT.pm> module, which is a subclass of
C<Catalyst::View::TT>. The "view" keyword tells the create script that
-you are creating a view, the first "TT" tells it that you are creating
-a Template Toolkit view, and the second "TT" tells the script to name
+you are creating a view, the second "TT" tells it that you are creating
+a Template Toolkit view, and the first "TT" tells the script to name
the View module "TT.pm", which is a commonly used name for TT views.
(You can name it anything you want, such as "HTML.pm".) If you look at
TT.pm, you will find that it only contains a config statement to set
Template Toolkit is a very full featured template facility, with
excellent documentation at
-L<http://template-tookit.org/>,
+L<http://template-toolkit.org/>,
but since this is not a TT tutorial, we'll stick to only basic TT
usage here (and explore some of the more common TT features in later
parts of the tutorial).
$c->stash->{template} = 'hello.tt';
}
-This time, instead of doing C<$c->response->body()>, you are setting
+This time, instead of doing C<$c-E<gt>response->body()>, you are setting
the value of the "template" hash key in the Catalyst "stash", an area
for putting information to share with other parts of your application.
The "template" key determines which template will be displayed at the
end of the method. Catalyst controllers have a default "end" action
for all methods which causes the first (or default) view to be
-rendered (unless there's a C<$c->response->body()> statement). So your
+rendered (unless there's a C<$c-E<gt>response->body()> statement). So your
template will be magically displayed at the end of your method.
After saving the file, restart the development server, and look at