From: hkclark Date: Mon, 29 Aug 2011 18:13:04 +0000 (-0400) Subject: Go from L to L X-Git-Tag: 5.9003~25^2~46 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=commitdiff_plain;h=2217b252905d370f4f7840cf78996d43c79e5d4f Go from L to L Had issues with some older POD tools that didn't want to display L correctly... assuming that's no longer an issue. --- diff --git a/lib/Catalyst/Manual/Tutorial/01_Intro.pod b/lib/Catalyst/Manual/Tutorial/01_Intro.pod index 4a18f15..995654a 100644 --- a/lib/Catalyst/Manual/Tutorial/01_Intro.pod +++ b/lib/Catalyst/Manual/Tutorial/01_Intro.pod @@ -117,7 +117,7 @@ A simple application that lists and adds books. =item * -The use of L (DBIC) for the model (including +The use of L (DBIC) for the model (including some of the more advanced techniques you will probably want to use in your applications). @@ -158,7 +158,7 @@ DBIx::Class.) =item * -The use of L or L +The use of L or L for automated form processing and validation. =back @@ -632,7 +632,7 @@ CatInABox You can get more information at L or -L. +L. =item * @@ -641,7 +641,7 @@ Frank Speiser's Amazon EC2 Catalyst SDK There are currently two flavors of publicly available Amazon Machine Images (AMI) that include all the elements you'd need to begin developing in a fully functional Catalyst environment within minutes. -See L +See L for more details. =back @@ -650,7 +650,7 @@ for more details. For additional information and recommendations on Catalyst installation, please refer to -L. +L. =head1 DATABASES @@ -679,7 +679,7 @@ with the following commands: cd MyApp_Chapter8/MyApp CATALYST_DEBUG=0 prove -wl t -If you wish to include the L section in your tests, +If you wish to include the L section in your tests, substitute C for C in the URL above (don't forget to "cd" out of the Ch8 directory if you ran the code above). diff --git a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod index 3808ec0..45b32a1 100644 --- a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod @@ -74,7 +74,7 @@ clean "separation of control" between the different portions of your application. Given that many other documents cover this subject in detail, MVC will not be discussed in depth here (for an excellent introduction to MVC and general Catalyst concepts, please see -L). In short: +L). In short: =over 4 @@ -110,7 +110,7 @@ automatically create our Catalyst model for use with a database. You can checkout the source code for this example from the catalyst subversion repository as per the instructions in -L. +L. =head1 CREATE A CATALYST PROJECT @@ -118,10 +118,10 @@ L. Catalyst provides a number of helper scripts that can be used to quickly flesh out the basic structure of your application. All Catalyst projects begin with the C helper (see -L for more information on helpers). +L for more information on helpers). Also note that as of Catalyst 5.7000, you will not have the helper -scripts unless you install both L -and L. +scripts unless you install both L +and L. In this first chapter of the tutorial, use the Catalyst C script to initialize the framework for an application called C: @@ -279,11 +279,11 @@ as a "404" message or a redirect, but for now just leave it alone. The "C<$c>" here refers to the Catalyst context, which is used to access the Catalyst application. In addition to many other things, the Catalyst context provides access to "response" and "request" objects. (See -L, L, and -L) +L, L, and +L) C<$c-Eresponse-Ebody> sets the HTTP response (see -L), while +L), while C<$c-Ewelcome_message> is a special method that returns the welcome message that you saw in your browser. @@ -385,7 +385,7 @@ The "view" keyword tells the create script that you are creating a view. 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 +default_view in Hello.pm (See L for more details on setting this). =item * 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 diff --git a/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod b/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod index 1815dc2..c2135f7 100644 --- a/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod +++ b/lib/Catalyst/Manual/Tutorial/04_BasicCRUD.pod @@ -70,13 +70,13 @@ Although this chapter of the tutorial will show you how to build CRUD functionality yourself, another option is to use a "CRUD builder" type of tool to automate the process. You get less control, but it can be quick and easy. For example, see -L, -L, and -L. +L, +L, and +L. You can check out the source code for this example from the Catalyst Subversion repository as per the instructions in -L. +L. =head1 FORMLESS SUBMISSION @@ -168,7 +168,7 @@ Edit C and then enter: The TT C directive allows access to a variety of plugin modules (TT plugins, that is, not Catalyst plugins) to add extra functionality to the base TT capabilities. Here, the plugin allows -L "pretty printing" of objects and +L "pretty printing" of objects and variables. Other than that, the rest of the code should be familiar from the examples in Chapter 3. @@ -334,7 +334,7 @@ chapter of the tutorial and explore slightly more advanced capabilities with the base method and delete feature below. But Chained dispatch is capable of far more. For additional information, see L, -L, +L, and the 2006 Advent calendar entry on the subject: L. @@ -970,7 +970,7 @@ with the new fields: exists "/root/dev/MyApp/script/../lib/MyApp/Model/DB.pm" Notice that we modified our use of the helper slightly: we told -it to include the L +it to include the L in the C line of the Result Classes. If you open C in your editor you should diff --git a/lib/Catalyst/Manual/Tutorial/05_Authentication.pod b/lib/Catalyst/Manual/Tutorial/05_Authentication.pod index ee0d2f9..749c973 100644 --- a/lib/Catalyst/Manual/Tutorial/05_Authentication.pod +++ b/lib/Catalyst/Manual/Tutorial/05_Authentication.pod @@ -65,7 +65,7 @@ cleartext authentication and 2) hash-based authentication. You can checkout the source code for this example from the catalyst subversion repository as per the instructions in -L. +L. =head1 BASIC AUTHENTICATION @@ -150,7 +150,7 @@ Speaking of "hand-editted enhancements," we should now add the C relationship information to the User Result Source file. As with the Book, BookAuthor, and Author files in L, -L has +L has automatically created the C and C relationships for the new User, UserRole, and Role tables. However, as a convenience for mapping Users to their assigned roles (see @@ -271,9 +271,9 @@ backed session store). =head2 Configure Authentication There are a variety of ways to provide configuration information to -L. +L. Here we will use -L +L because it automatically sets a reasonable set of defaults for us. Open C and place the following text above the call to C<__PACKAGE__-Esetup();>: @@ -309,7 +309,7 @@ to the following code: B Here is a short script that will dump the contents of -Cconfig> to L format in +Cconfig> to L format in C: $ CATALYST_DEBUG=0 perl -Ilib -e 'use MyApp; use Config::General; @@ -831,7 +831,7 @@ I. In general, this is exactly what you want -- the C message will get displayed on the next screen where it's appropriate, but it won't "keep showing up" after that first time (unless you reset it). Please refer to -L for additional +L for additional information. diff --git a/lib/Catalyst/Manual/Tutorial/06_Authorization.pod b/lib/Catalyst/Manual/Tutorial/06_Authorization.pod index 540b5e4..84c9ec2 100644 --- a/lib/Catalyst/Manual/Tutorial/06_Authorization.pod +++ b/lib/Catalyst/Manual/Tutorial/06_Authorization.pod @@ -65,7 +65,7 @@ can simplify your code and make things easier to maintain. You can checkout the source code for this example from the catalyst subversion repository as per the instructions in -L. +L. =head1 BASIC AUTHORIZATION diff --git a/lib/Catalyst/Manual/Tutorial/07_Debugging.pod b/lib/Catalyst/Manual/Tutorial/07_Debugging.pod index e440945..44e0f9a 100644 --- a/lib/Catalyst/Manual/Tutorial/07_Debugging.pod +++ b/lib/Catalyst/Manual/Tutorial/07_Debugging.pod @@ -80,7 +80,7 @@ Catalyst is able to easily accommodate both styles of debugging. =head1 LOG STATEMENTS Folks in the former group can use Catalyst's C<$c-Elog> facility. -(See L for more detail.) For example, if +(See L for more detail.) For example, if you add the following code to a controller action method: $c->log->info("Starting the foreach loop here"); @@ -103,7 +103,7 @@ severity/importance): $c->log->error $c->log->fatal -You can also use L in both Catalyst code +You can also use L in both Catalyst code (Clog-Edebug("\$var is: ".Dumper($var));)>) and TT templates (C<[% Dumper.dump(book) %]>. @@ -293,7 +293,7 @@ need to install the C package to use the C command. Use C to do that. For example, you could make a copy of -L +L with the following command: mkdir -p lib/Catalyst/Plugin; cp \ @@ -357,7 +357,7 @@ declaration in C: There are a variety of options you can use, such as 'undef', 'all', 'service', 'context', 'parser' and 'provider'. See -L for more information +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). diff --git a/lib/Catalyst/Manual/Tutorial/08_Testing.pod b/lib/Catalyst/Manual/Tutorial/08_Testing.pod index a3b5d22..b803acd 100644 --- a/lib/Catalyst/Manual/Tutorial/08_Testing.pod +++ b/lib/Catalyst/Manual/Tutorial/08_Testing.pod @@ -65,7 +65,7 @@ upgrade various pieces of your application over time. You can check out the source code for this example from the Catalyst Subversion repository as per the instructions in -L. +L. For an excellent introduction to learning the many benefits of testing your Perl applications and modules, you might want to read 'Perl Testing: @@ -167,10 +167,10 @@ For example: Although the Catalyst helper scripts provide a basic level of checks "for free," testing can become significantly more helpful when you write your own script to exercise the various parts of your application. The -L module +L module is very popular for writing these sorts of test cases. This module -extends L (and therefore -L) to allow you to automate the action of +extends L (and therefore +L) to allow you to automate the action of a user "clicking around" inside your application. It gives you all the benefits of testing on a live system without the messiness of having to use an actual web server, and a real person to do the clicking. @@ -282,13 +282,13 @@ editor and enter the following: The C test cases uses copious comments to explain each step of the process. In addition to the techniques shown here, there are a variety of other methods available in -L (for +L (for example, regex-based matching). Consult the documentation for more detail. B: For I vs. the "full application tests" approach used -by L, see -L. +by L, see +L. B The test script does not test the C and C actions. That is left as an exercise for the reader @@ -347,7 +347,7 @@ the state of the application right before or after the failure. You may wish to leverage the techniques discussed in this tutorial to maintain both a "production database" for your live application and a "testing database" for your test cases. One advantage to -L is that +L is that it runs your full application; however, this can complicate things when you want to support multiple databases. diff --git a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod index 855d653..a566e92 100644 --- a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod +++ b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod @@ -56,27 +56,27 @@ L =head1 DESCRIPTION -This portion of the tutorial explores L and +This portion of the tutorial explores L and how it can be used to manage forms, perform validation of form input, as well as save and restore data to/from the database. This was written using HTML::FormFu version 0.05001. See -L +L for additional form management options other than -L. +L. =head1 HTML::FormFu FORM CREATION -This section looks at how L can be used to +This section looks at how L can be used to add additional functionality to the manually created form from Chapter 4. =head2 Inherit From Catalyst::Controller::HTML::FormFu First, change your C to inherit from -L +L by changing the C line from the default of: BEGIN {extends 'Catalyst::Controller'; } @@ -143,7 +143,7 @@ following method: =head2 Create a Form Config File Although C supports any configuration file handled by -L, most people tend to use YAML. First +L, most people tend to use YAML. First create a directory to hold your form configuration files: mkdir -p root/forms/books @@ -278,7 +278,7 @@ performing any validation. =head1 HTML::FormFu VALIDATION AND FILTERING -Although the use of L in the previous section +Although the use of L in the previous section did provide an automated mechanism to build the form, the real power of this module stems from functionality that can automatically validate and filter the user input. Validation uses constraints to be sure that @@ -393,13 +393,13 @@ C and C options in C. =item * Constraints are added to provide validation of the user input. See -L for other +L for other constraints that are available. =item * A variety of filters are run on every field to remove and escape -unwanted input. See L +unwanted input. See L for more filter options. =back @@ -585,7 +585,7 @@ real reason you worked through this Tutorial in the first place. If you are having difficulty with YAML config above, please save the below into the file C and delete the C file. The below is in -L format which follows the syntax of +L format which follows the syntax of Apache config files. constraints Required diff --git a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormHandler.pod b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormHandler.pod index 13f3836..af1447b 100644 --- a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormHandler.pod +++ b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormHandler.pod @@ -57,15 +57,15 @@ L =head1 DESCRIPTION This portion of the tutorial explores -L and how it can be used to manage +L and how it can be used to manage forms, perform validation of form input, and save and restore data to or from the database. This was written using HTML::FormHandler version 0.28001. See -L +L for additional form management options other than -L. +L. =head1 Install HTML::FormHandler @@ -86,7 +86,7 @@ to your C. =head1 HTML::FormHandler FORM CREATION -This section looks at how L can be used to +This section looks at how L can be used to add additional functionality to the manually created form from Chapter 4. diff --git a/lib/Catalyst/Manual/Tutorial/10_Appendices.pod b/lib/Catalyst/Manual/Tutorial/10_Appendices.pod index 9b1726f..a2160ef 100644 --- a/lib/Catalyst/Manual/Tutorial/10_Appendices.pod +++ b/lib/Catalyst/Manual/Tutorial/10_Appendices.pod @@ -541,7 +541,7 @@ The Perl C module =back For CentOS users (see -L), +L), you can use the following commands to install the software and start the MySQL daemon: