From: Graham Knop Date: Sun, 10 Mar 2019 03:36:03 +0000 (+0100) Subject: various format code fixups X-Git-Tag: v5.9010~15 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=commitdiff_plain;h=080bb6202ae1dc9a786bb32afcb391f542c2f0fc various format code fixups --- diff --git a/lib/Catalyst/Manual/Cookbook.pod b/lib/Catalyst/Manual/Cookbook.pod index 8c4b7d4..58e9d0a 100644 --- a/lib/Catalyst/Manual/Cookbook.pod +++ b/lib/Catalyst/Manual/Cookbook.pod @@ -821,17 +821,17 @@ This time, the helper sets several options for us in the generated View. =over -=item +=item * INCLUDE_PATH defines the directories that Template Toolkit should search for the template files. -=item +=item * PRE_PROCESS is used to process configuration options which are common to every template file. -=item +=item * WRAPPER is a file which is processed with each template, usually used to easily provide a common header and footer for every page. @@ -856,7 +856,7 @@ or sections; just put in the content. The WRAPPER will the rest of the page around your template for you. -=head3 $c->stash +=head3 C<< $c->stash >> Of course, having the template system include the header and footer for you isn't all that we want our templates to do. We need to be able to @@ -911,7 +911,7 @@ This is the most basic usage, but Template Toolkit is quite powerful, and allows you to truly keep your presentation logic separate from the rest of your application. -=head3 $c->uri_for() +=head3 C<< $c->uri_for() >> One of my favorite things about Catalyst is the ability to move an application around without having to worry that everything is going to @@ -922,7 +922,7 @@ to "/Calendar", "/Calendar/2005", "/Calendar/2005/10", etc. If you move the application to be at http://www.mydomain.com/Tools/Calendar, then all of those links will suddenly break. -That's where $c->uri_for() comes in. This function will merge its +That's where C<< $c->uri_for() >> comes in. This function will merge its parameters with either the base location for the app, or its current namespace. Let's take a look at a couple of examples. @@ -944,7 +944,7 @@ Likewise, The first parameter does NOT have a forward slash, and so it will be relative to the current namespace. If the application is installed at http://www.domain.com/Calendar. and if the template is called from -MyApp::Controller::Display, then the link would become +C, then the link would become http://www.domain.com/Calendar/Display/2005/10/24. If you want to link to a parent uri of your current namespace you can diff --git a/lib/Catalyst/Manual/Deployment.pod b/lib/Catalyst/Manual/Deployment.pod index a56c314..816d3ed 100644 --- a/lib/Catalyst/Manual/Deployment.pod +++ b/lib/Catalyst/Manual/Deployment.pod @@ -91,7 +91,7 @@ L is an open-source systems integration framework built specifically for automating cloud computing deployments. A Cookbooks demonstrating how to deploy a Catalyst application using Chef is available at L and -L. +L. =head1 AUTHORS diff --git a/lib/Catalyst/Manual/ExtendingCatalyst.pod b/lib/Catalyst/Manual/ExtendingCatalyst.pod index 9f73e8d..1d5b6ec 100644 --- a/lib/Catalyst/Manual/ExtendingCatalyst.pod +++ b/lib/Catalyst/Manual/ExtendingCatalyst.pod @@ -14,7 +14,7 @@ Catalyst's behaviour, and this can be confusing. This document is written to help you understand the possibilities, current practices and their consequences. -Please read the L section before deciding on a design, +Please read the L section before deciding on a design, especially if you plan to release your code to CPAN. The Catalyst developer and user communities, which B, will benefit most if we all work together and coordinate. @@ -255,7 +255,7 @@ in the controller object's hash reference, and available from the accessor. The C accessor always only contains the original class configuration -and you B call $self->config to get your component configuration, +and you B call C<< $self->config >> to get your component configuration, as the data there is likely to be a subset of the correct config. For example: @@ -580,7 +580,7 @@ lifecycle. If your functionality needs to change some C or C stages, you won't get around a plugin. Note, if you just want to hook into such a stage, and run code before, -or after it, then it is recommended that you use Ls method modifiers +or after it, then it is recommended that you use L's method modifiers to do this. Another valid target for a plugin architecture are things that diff --git a/lib/Catalyst/Manual/Intro.pod b/lib/Catalyst/Manual/Intro.pod index 4f3fe43..77b2c81 100644 --- a/lib/Catalyst/Manual/Intro.pod +++ b/lib/Catalyst/Manual/Intro.pod @@ -294,7 +294,7 @@ where the first C tells the script that the name of the view should be C, and the second that it should be a Template Toolkit view.) This gives us a process() method and we can now just do -$c->forward('MyApp::View::TT') to render our templates. The base class +C<< $c->forward('MyApp::View::TT') >> to render our templates. The base class makes process() implicit, so we don't have to say C<< $c->forward(qw/MyApp::View::TT process/) >>. @@ -514,7 +514,7 @@ equivalent to the same controller above: =head3 ACCEPT_CONTEXT -Whenever you call $c->component("Foo") you get back an object - the +Whenever you call C<< $c->component("Foo") >> you get back an object - the instance of the model. If the component supports the C method instead of returning the model itself, the return value of C<< $model->ACCEPT_CONTEXT( $c ) >> will be used. @@ -562,7 +562,7 @@ In a subroutine in the model code, we can then do this: Note that we still want the Catalyst models to be a thin wrapper around classes that will work independently of the Catalyst application to promote reusability of code. Here we might just want -to grab the $c->model('DB')->schema so as to get the connection +to grab the C<< $c->model('DB')->schema >> so as to get the connection information from the Catalyst application's configuration for example. The life time of this value is B, and not per request. To diff --git a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod index c410066..5d0721c 100644 --- a/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod @@ -290,7 +290,7 @@ L), while C<< $c->welcome_message >> is a special method that returns the welcome message that you saw in your browser. -The ":Path :Args(0)" after the method name are attributes which +The "C<:Path :Args(0)>" after the method name are attributes which determine which URLs will be dispatched to this method. (You might see ":Private" if you are using an older version of Catalyst, but using that with "default" or "index" is currently deprecated. If so, you should @@ -301,7 +301,7 @@ policy, prefers to handle URL dispatching with attributes on controller methods. There is a lot of flexibility in specifying which URLs to match. This particular method will match all URLs, because it doesn't specify the path (nothing comes after "Path"), but will only accept a -URL without any args because of the ":Args(0)". +URL without any args because of the "C<:Args(0)>". The default is to map URLs to controller names, and because of the way that Perl handles namespaces through package names, it is simple to diff --git a/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod index 3a256fb..ae7edf9 100644 --- a/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod @@ -1151,7 +1151,7 @@ Authentication chapter of the tutorial). =item * Although it is beyond the scope of this tutorial, you may wish to use a -JavaScript or AJAX tool such as jQuery (L) or +JavaScript or AJAX tool such as jQuery (L) or Dojo (L). =back @@ -1397,7 +1397,7 @@ update the template to do that. Let's add a new column to our book list page that takes advantage of the relationship information we manually added to our schema files in the previous section. Edit F and replace the -"empty" table cell "" with the following: +"empty" table cell "C<< >>" with the following: ... diff --git a/lib/Catalyst/Manual/Tutorial/05_Authentication.pod b/lib/Catalyst/Manual/Tutorial/05_Authentication.pod index e5fe260..1b6078f 100644 --- a/lib/Catalyst/Manual/Tutorial/05_Authentication.pod +++ b/lib/Catalyst/Manual/Tutorial/05_Authentication.pod @@ -606,7 +606,7 @@ We are just avoiding the I of cleartext passwords in the database by using a salted SHA-1 hash. If you are concerned about cleartext passwords between the browser and your application, consider using SSL/TLS, made easy with modules such as -L and L. +L and L. =head2 Re-Run the DBIC::Schema Model Helper to Include DBIx::Class::PassphraseColumn @@ -802,8 +802,8 @@ flash vs. the C query parameter: ... Although the sample above only shows the C div, leave the rest -of the file intact -- the only change we made to replace "|| -c.request.params.status_msg" with "c.flash.status_msg" in the +of the file intact -- the only change we made to replace "C<|| +c.request.params.status_msg>" with "C" in the C<< >> line. diff --git a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod index 457f92e..20622cb 100644 --- a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod +++ b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormFu.pod @@ -378,7 +378,7 @@ to match: - HTMLEscape B Copying and pasting YAML from Perl documentation is sometimes -tricky. See the L section of +tricky. See the L section of this document for a more foolproof config format. The main changes are: diff --git a/lib/Catalyst/Manual/Tutorial/10_Appendices.pod b/lib/Catalyst/Manual/Tutorial/10_Appendices.pod index 9abe1a6..84c5d6a 100644 --- a/lib/Catalyst/Manual/Tutorial/10_Appendices.pod +++ b/lib/Catalyst/Manual/Tutorial/10_Appendices.pod @@ -77,14 +77,14 @@ regex patterns). I: =item * -":0,$s/^ " +C<":0,$s/^ "> Removes four leading spaces from the entire file (from the first line, C<0>, to the last line, C<$>). =item * -"%s/^ " +C<"%s/^ "> A shortcut for the previous item (C<%> specifies the entire file; so this removes four leading spaces from every line). @@ -98,7 +98,7 @@ the regex command is executed (".") to the last line of the file. =item * -":.,44s/^ " +C<":.,44s/^ "> Removes four leading space from the current line through line 44 (obviously adjust the C<44> to the appropriate value in your example).