X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2FMoreCatalystBasics.pod;h=2c22731caf92b43f0fec92ad6d741f201bc90f77;hp=48982abfa40b6ed81039c662a1a700934cf46919;hb=b411df01b40662f125aa854a7c25097bc53ad86a;hpb=45c7830fc2a9167e08203368ca11d6d13628c5fb diff --git a/lib/Catalyst/Manual/Tutorial/MoreCatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/MoreCatalystBasics.pod index 48982ab..2c22731 100644 --- a/lib/Catalyst/Manual/Tutorial/MoreCatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/MoreCatalystBasics.pod @@ -87,7 +87,7 @@ tutorial): $ cd MyApp This creates a similar skeletal structure to what we saw in Part 2 of -the tutorial, except with C or C substituted for +the tutorial, except with C and C substituted for C and C. @@ -186,12 +186,12 @@ with: Replace it with: use Catalyst qw/ - -Debug - ConfigLoader - Static::Simple - - StackTrace - /; + -Debug + ConfigLoader + Static::Simple + + StackTrace + /; This tells Catalyst to start using one new plugin: @@ -272,7 +272,7 @@ Catalyst components. It is used to pass information between components and provide access to Catalyst and plugin functionality. B: You may see the C<$c-Emodel('DB::Book')> used above -written as C<$c-Emodel('DB')-Eresultset('Book)>. The two +written as C<$c-Emodel('DB')-Eresultset('Book')>. The two are equivalent. B Catalyst actions are regular Perl methods, but they make use @@ -309,7 +309,7 @@ TT (for more information on TT, see L). Other popular view technologies include Mason (L and L) and L -(L). +(L). =head2 Create a Catalyst View Using C @@ -361,30 +361,12 @@ directories that can be used to customize the look and feel of your application. Also take a look at C for config values set by the C helper. -B: Note that TTSite does one thing that could confuse people who -are used to the normal C Catalyst view: it redefines the Catalyst -context object in templates from its usual C to C. When -looking at other Catalyst examples, remember that they almost always use -C. Note that Catalyst and TT I when you use the -wrong name to access the context object...TT simply outputs blanks for -that bogus logic (see next tip to change this behavior with TT C -options). Finally, be aware that this change in name I -applies to how the context object is accessed inside your TT templates; -your controllers will continue to use C<$c> (or whatever name you use -when fetching the reference from C<@_> inside your methods). (You can -change back to the "default" behavior be removing the C -line from C, but you will also have to edit -C and C. If you do this, be -careful not to have a collision between your own C variable and the -Catalyst C variable.) - B: When troubleshooting TT it can be helpful to enable variable C options. You can do this in a Catalyst environment by adding a C line to the C<__PACKAGE__->config> declaration in C: __PACKAGE__->config({ - CATALYST_VAR => 'Catalyst', ... DEBUG => 'undef', ... @@ -395,7 +377,7 @@ of the package where it is used. Therefore, in C, C<__PACKAGE__> is equivalent to C. There are a variety of options you can use, such as 'undef', 'all', -'service', 'context', 'parser', 'provider', and 'service'. See +'service', 'context', 'parser' and 'provider'. See L for more information (remove the C portion of the name shown in the TT docs and convert to lower case for use inside Catalyst). @@ -745,7 +727,7 @@ used the following SQL to retrieve the data: because we enabled DBIC_TRACE. -You now the beginnings of a simple but workable web application. +You now have the beginnings of a simple but workable web application. Continue on to future sections and we will develop the application more fully. @@ -762,7 +744,7 @@ will use static schema files for more control. This is typical of most One option would be to create a separate schema file for each table in the database, however, lets use the same L used earlier with C to build the static files for us. -First, lets remove the schema file created in Part 2: +First, lets remove the schema file created earlier: $ rm lib/MyApp/Schema.pm