From: Graham Knop Date: Fri, 8 Mar 2019 02:09:06 +0000 (+0100) Subject: use F<> format codes for files rather than C<> X-Git-Tag: v5.9010~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=commitdiff_plain;h=f4e9de4a3171fd75d04fa8e294fd9a0ae367bc18 use F<> format codes for files rather than C<> --- diff --git a/lib/Catalyst/Manual/Cookbook.pod b/lib/Catalyst/Manual/Cookbook.pod index a550208..16f3739 100644 --- a/lib/Catalyst/Manual/Cookbook.pod +++ b/lib/Catalyst/Manual/Cookbook.pod @@ -180,7 +180,7 @@ L is a method for creating flexible and readable configuration files. It's a great way to keep your Catalyst application configuration in one easy-to-understand location. -Now create C in your application home: +Now create F in your application home: name MyApp @@ -1050,7 +1050,7 @@ Note the use of quotes around the filename; this ensures that any spaces in the filename are handled by the browser. Put this right before calling C<< $c->res->body >> and your browser -will download a file named C instead of +will download a file named F instead of C. You can also use this to have the browser download content which it @@ -1505,8 +1505,8 @@ production environment. Static::Simple is a plugin that will help to serve static content for your application. By default, it will serve most types of files, excluding some standard Template Toolkit extensions, out of your B file directory. All -files are served by path, so if B is requested, then -B is found and served. +files are served by path, so if F is requested, then +F is found and served. =head3 Usage @@ -1519,12 +1519,12 @@ and already files will be served. =head3 Configuring Static content is best served from a single directory within your root -directory. Having many different directories such as C and -C requires more code to manage, because you must separately -identify each static directory--if you decide to add a C +directory. Having many different directories such as F and +F requires more code to manage, because you must separately +identify each static directory--if you decide to add a F directory, you'll need to change your code to account for it. In contrast, keeping all static directories as subdirectories of a main -C directory makes things much easier to manage. Here's an +F directory makes things much easier to manage. Here's an example of a typical root directory structure: root/ @@ -1537,7 +1537,7 @@ example of a typical root directory structure: root/static/js/code.js -All static content lives under C, with everything else being +All static content lives under F, with everything else being Template Toolkit files. =over 4 @@ -1629,7 +1629,7 @@ C<< $c->res->body >>. Next, create a controller to handle requests for the /static path. Use the Helper to save time. This command will create a stub controller as -C. +F. $ script/myapp_create.pl controller Static @@ -1681,7 +1681,7 @@ code in your Static controller: When using Apache, you can bypass Catalyst and any Static plugins/controllers controller by intercepting requests for the -C path at the server level. All that is required is to +F path at the server level. All that is required is to define a DocumentRoot and add a separate Location block for your static content. Here is a complete config for this application under mod_perl 1.x: @@ -1850,12 +1850,12 @@ alterations. Catalyst provides a convenient way of testing your application during development and before deployment in a real environment. -C makes it possible to run the same tests both locally +L makes it possible to run the same tests both locally (without an external daemon) and against a remote server via HTTP. =head3 Tests -Let's examine a skeleton application's C directory: +Let's examine a skeleton application's F directory: mundus:~/MyApp chansen$ ls -l t/ total 24 @@ -1865,17 +1865,17 @@ Let's examine a skeleton application's C directory: =over 4 -=item C<01app.t> +=item F<01app.t> Verifies that the application loads, compiles, and returns a successful response. -=item C<02pod.t> +=item F<02pod.t> Verifies that all POD is free from errors. Only executed if the C environment variable is true. -=item C<03podcoverage.t> +=item F<03podcoverage.t> Verifies that all methods/functions have POD coverage. Only executed if the C environment variable is true. diff --git a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod index 99b531b..3f58d07 100644 --- a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod @@ -117,13 +117,13 @@ 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 +begin with the F helper (see 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. -In this first chapter of the tutorial, use the Catalyst C +In this first chapter of the tutorial, use the Catalyst F script to initialize the framework for an application called C: $ catalyst.pl Hello @@ -140,7 +140,7 @@ Note: If you are using Strawberry Perl on Win32, drop the ".pl" from the end of the "catalyst.pl" command and simply use "catalyst Hello". -The C helper script will display the names of the +The F helper script will display the names of the directories and files it creates: Changes # Record of application changes @@ -170,7 +170,7 @@ directories and files it creates: Catalyst will "auto-discover" modules in the Controller, Model, and View -directories. When you use the C script it will create Perl +directories. When you use the F script it will create Perl module scaffolds in those directories, plus test files in the "t" directory. The default location for templates is in the "root" directory. The scripts in the script directory will always start with @@ -264,7 +264,7 @@ necessary. =head2 The Simplest Way The Root.pm controller is a place to put global actions that usually -execute on the root URL. Open the C file +execute on the root URL. Open the F file in your editor. You will see the "index" subroutine, which is responsible for displaying the welcome screen that you just saw in your browser. @@ -314,7 +314,7 @@ method. While you leave the C