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=8a295a402ef04cbd0df0d4111e799a3d2ae899b9;hp=b9f30a3366c1f3249d9aae03b15d2272b353c7a3;hb=d09971d0950d09ed4b766ecbbc1c2c1624a8fd33;hpb=40a01e5b4dd60e39c9682bca643de0b240b1b07c diff --git a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod index b9f30a3..8a295a4 100644 --- a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod @@ -319,6 +319,10 @@ file: $c->response->body("Hello, World!"); } +Once you restart the server, you will need to use the new address +L instead of L to see the +changes. + B: See Appendix 1 for tips on removing the leading spaces when cutting and pasting example code from POD-based documents. @@ -367,9 +371,9 @@ Toolkit Template template file), the actual templates go under the To create a TT view, run: - $ script/hello_create.pl view TT TT + $ script/hello_create.pl view HTML TT -This creates the C module, which is a subclass of +This creates the C module, which is a subclass of C. =over 4 @@ -380,9 +384,11 @@ The "view" keyword tells the create script that you are creating a view. =item * -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".) +The first argument "HTML" tells the script to name the View module "HTML.pm", +which is a commonly used name for TT views. You can name it anything you want, +such as "MyView.pm". If you have more than one view, be sure to set the +default_view in Hello.pm (See L for more +details on setting this). =item * @@ -391,10 +397,10 @@ indicating that you want to a Template Toolkit view. =back -If you look at C you will find that it only +If you look at C you will find that it only contains a config statement to set the TT extension to ".tt". -Now that the TT.pm "View" exists, Catalyst will autodiscover it and be +Now that the HTML.pm "View" exists, Catalyst will autodiscover it and be able to use it to display the view templates using the "process" method that it inherits from the C class. @@ -529,5 +535,5 @@ Please report any errors, issues or suggestions to the author. The most recent version of the Catalyst Tutorial can be found at L. -Copyright 2006-2008, Kennedy Clark & Gerda Shank, under Creative Commons License +Copyright 2006-2010, Kennedy Clark, under Creative Commons License (L).