X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2F02_CatalystBasics.pod;h=99b531b978dce709cf4712c69976396b819420aa;hp=c4524ec053b281efee123102c5c9e8c5b43c1ea2;hb=429d1caf111575afa4c25287cc48d7ed712af327;hpb=7ce05098c9b1df9078e709e5a724e821a3b3b00d diff --git a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod index c4524ec..99b531b 100644 --- a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod @@ -285,9 +285,9 @@ context provides access to "response" and "request" objects. (See L, L, and L) -C<$c-Eresponse-Ebody> sets the HTTP response (see +C<< $c->response->body >> sets the HTTP response (see L), while -C<$c-Ewelcome_message> is a special method that returns the welcome +C<< $c->welcome_message >> is a special method that returns the welcome message that you saw in your browser. The ":Path :Args(0)" after the method name are attributes which @@ -424,13 +424,13 @@ following: $c->stash(template => 'hello.tt'); } -This time, instead of doing C<$c-Eresponse-Ebody()>, you are +This time, instead of doing C<< $c->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 request cycle. 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-Eresponse-Ebody()> +view to be rendered (unless there's a C<< $c->response->body() >> statement). So your template will be magically displayed at the end of your method. @@ -462,7 +462,7 @@ You can also set multiple stash values with a hashref: $c->stash({template => 'hello.tt', foo => 'bar', another_thing => 1}); -Any of these formats work, but the C<$c-Estash(name =E value);> +Any of these formats work, but the C<< $c->stash(name => value); >> style is growing in popularity -- you may wish to use it all the time (even when you are only setting a single value).