X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2F03_MoreCatalystBasics.pod;h=39d41bdb9856794dfd3b49104de44efde525ed58;hp=afddf454f62b04e9dbce4a3c97835ced15b9e876;hb=2217b252905d370f4f7840cf78996d43c79e5d4f;hpb=b9e431e31e8cbd4efc46e4270098567faf7e4f29 diff --git a/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod index afddf45..39d41bd 100644 --- a/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod @@ -66,7 +66,7 @@ all web applications. You can check out the source code for this example from the Catalyst Subversion repository as per the instructions in -L. +L. Please take a look at L before @@ -158,25 +158,25 @@ free to make use of it in your own projects. =item * -L +L C provides an automatic way to load configurable parameters for your application from a central -L file (versus having the values +L file (versus having the values hard-coded inside your Perl modules). Config::General uses syntax very similar to Apache configuration files. We will see how to use this feature of Catalyst during the authentication and authorization sections (Chapter 5 and Chapter 6). B If you are using a version of -L prior to version 1.06, be aware that +L prior to version 1.06, be aware that Catalyst changed the default format from YAML to the more straightforward C style. This tutorial uses the newer C file for C. However, Catalyst supports both formats and will automatically use either C or C (or any other format supported by -L and -L). If you are using a version of +L and +L). If you are using a version of Catalyst::Devel prior to 1.06, you can convert to the newer format by simply creating the C file manually and deleting C. The default contents of the C you create @@ -192,7 +192,7 @@ formats: =item * -L +L C provides an easy way to serve static content, such as images and CSS files, from the development server. @@ -398,8 +398,8 @@ B<:Chained> -- Newer Catalyst applications tend to use the Chained dispatch form of action types because of its power and flexibility. It allows a series of controller methods to be automatically dispatched to service a single user request. See -L -and L +L +and L for more information on chained actions. =back @@ -428,9 +428,9 @@ L (L). =head2 Create a Catalyst View When using TT for the Catalyst view, the main helper script is -L. You may also +L. You may also come across references to -L, but +L, but its use is now deprecated. Enter the following command to enable the C style of view rendering @@ -698,12 +698,12 @@ L. =head1 DATABASE ACCESS WITH DBIx::Class Catalyst can be used with virtually any form of datastore available via -Perl. For example, L can be +Perl. For example, L can be used to access databases through the traditional Perl L interface or you can use a model to access files of any type on the filesystem. However, most Catalyst applications use some form of object-relational mapping (ORM) technology to create objects associated with tables in a -relational database. Matt Trout's L +relational database. Matt Trout's L (abbreviated as "DBIC") has rapidly emerged as the Perl-based ORM technology of choice. Most new Catalyst applications rely on DBIx::Class, as will this tutorial. @@ -758,7 +758,7 @@ just installed into your Makefile.PL Before you continue, make sure your C database file is in the application's topmost directory. Now use the model helper with the C option to read the database with -L and +L and automatically build the required files for us: $ script/myapp_create.pl model DB DBIC::Schema MyApp::Schema \ @@ -796,7 +796,7 @@ C. =item * C causes -L to load the +L to load the schema as it runs and then write that information out into files. =item * @@ -807,7 +807,7 @@ SQLite. =item * And finally, the C string requests that -L create +L create foreign key relationships for us (this is not needed for databases such as PostgreSQL and MySQL, but is required for SQLite). If you take a look at C, you will see that the SQLite pragma is @@ -848,7 +848,7 @@ can see these three model files listed in the debug output generated when you launch the application). B Older versions of -L use the +L use the deprecated DBIx::Class C technique instead of the newer C. For new applications, please try to use C since it more easily supports a very useful DBIC @@ -897,7 +897,7 @@ delete the next 2 lines): B: You may see the C<$c-Emodel('DB::Book')> un-commented above written as C<$c-Emodel('DB')-Eresultset('Book')>. The two are equivalent. Either way, C<$c-Emodel> returns a -L which handles queries +L which handles queries against the database and iterating over the set of results that is returned. @@ -912,8 +912,8 @@ Some other examples are provided in L, with additional information found at L, L, -L and -L. +L and +L. =head2 Test Run The Application @@ -1131,7 +1131,7 @@ B The Catalyst stash only lasts for a single HTTP request. If you need to retain information across requests you can use -L (we will use +L (we will use Catalyst sessions in the Authentication chapter of the tutorial). =item * @@ -1447,7 +1447,7 @@ information that can appear in that field (and can therefore inject markup or code if you don't "neutralize" those fields). In addition to "| html", Template Toolkit has a variety of other useful filters that can found in the documentation for -L. +L. =head1 RUNNING THE APPLICATION FROM THE COMMAND LINE @@ -1479,7 +1479,7 @@ if you wish.> Once your controller logic has processed the request from a user, it forwards processing to your view in order to generate the appropriate response output. Catalyst uses -L by default +L by default to automatically perform this operation. If you look in C, you should see the empty definition for the C method: @@ -1506,9 +1506,9 @@ the controller does not define a controller-specific C method, the =item * Because the definition includes an C attribute, the -L logic will +L logic will be executed B any code inside the definition of C is -run. See L for +run. See L for more information on C. =item * @@ -1518,7 +1518,7 @@ logic in C. However, you can easily extend the C logic by adding your own code inside the empty method body (C<{}>) created by the Catalyst Helpers when we first ran the C to initialize our application. See -L for more +L for more detailed information on how to extend C in C. =back @@ -1543,7 +1543,7 @@ Along with a summary of your application's state at the end of the processing for that request. The "Stash" section should show a summarized version of the DBIC book model objects. If desired, you can adjust the summarization logic (called "scrubbing" logic) -- see -L for +L for details. Note that you shouldn't need to worry about "normal clients" using this