[Catalyst-commits] r13141 -
Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Wed Apr 7 12:57:12 GMT 2010
Author: caelum
Date: 2010-04-07 13:57:12 +0100 (Wed, 07 Apr 2010)
New Revision: 13141
Modified:
Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod
Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod
Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/05_Authentication.pod
Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/07_Debugging.pod
Log:
rename View::TT to View::HTML
Modified: Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod
===================================================================
--- Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod 2010-04-07 04:33:32 UTC (rev 13140)
+++ Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod 2010-04-07 12:57:12 UTC (rev 13141)
@@ -367,9 +367,9 @@
To create a TT view, run:
- $ script/hello_create.pl view TT TT
+ $ script/hello_create.pl view HTML TT
-This creates the C<lib/Hello/View/TT.pm> module, which is a subclass of
+This creates the C<lib/Hello/View/HTML.pm> module, which is a subclass of
C<Catalyst::View::TT>.
=over 4
@@ -380,11 +380,11 @@
=item *
-The first "TT" tells the script to name the View module "TT.pm", which is a
-commonly used name for TT views. You can name it anything you want, such as
-"HTML.pm". If you name it something other than TT.pm be sure to set the
-default_view in Hello.pm (See L<Catalyst::View::TT|Catalyst::View::TT> for
-more details on setting this).
+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<Catalyst::View::TT|Catalyst::View::TT> for more
+details on setting this).
=item *
@@ -393,10 +393,10 @@
=back
-If you look at C<lib/Hello/View/TT.pm> you will find that it only
+If you look at C<lib/Hello/View/HTML.pm> you will find that it only
contains a config statement to set the TT extension to ".tt".
-Now that the TT.pm "View" exists, Catalyst will autodiscover it and be
+Now that the HTML.pm "View" exists, Catalyst will autodiscover it and be
able to use it to display the view templates using the "process"
method that it inherits from the C<Catalyst::View::TT> class.
Modified: Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod
===================================================================
--- Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod 2010-04-07 04:33:32 UTC (rev 13140)
+++ Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod 2010-04-07 12:57:12 UTC (rev 13141)
@@ -436,22 +436,20 @@
Enter the following command to enable the C<TT> style of view
rendering for this tutorial:
- $ script/myapp_create.pl view TT TT
+ $ script/myapp_create.pl view HTML TT
exists "/home/me/MyApp/script/../lib/MyApp/View"
exists "/home/me/MyApp/script/../t"
- created "/home/me/MyApp/script/../lib/MyApp/View/TT.pm"
- created "/home/me/MyApp/script/../t/view_TT.t"
+ created "/home/me/MyApp/script/../lib/MyApp/View/HTML.pm"
+ created "/home/me/MyApp/script/../t/view_HTML.t"
-This simply creates a view called C<TT> (the second 'TT' argument) in
-a file called C<TT.pm> (the first 'TT' argument). It is now up to you
-to decide how you want to structure your view layout. For the
-tutorial, we will start with a very simple TT template to initially
-demonstrate the concepts, but quickly migrate to a more typical
-"wrapper page" type of configuration (where the "wrapper" controls the
-overall "look and feel" of your site from a single file or set of
-files).
+This simply creates a view called C<HTML> in a file called C<HTML.pm> (the first
+argument). It is now up to you to decide how you want to structure your view
+layout. For the tutorial, we will start with a very simple TT template to
+initially demonstrate the concepts, but quickly migrate to a more typical
+"wrapper page" type of configuration (where the "wrapper" controls the overall
+"look and feel" of your site from a single file or set of files).
-Edit C<lib/MyApp/View/TT.pm> and you should see that the default
+Edit C<lib/MyApp/View/HTML.pm> and you should see that the default
contents contains something similar to the following:
__PACKAGE__->config(TEMPLATE_EXTENSION => '.tt');
@@ -936,7 +934,7 @@
| MyApp::Model::DB::Author | class |
| MyApp::Model::DB::Book | class |
| MyApp::Model::DB::BookAuthor | class |
- | MyApp::View::TT | instance |
+ | MyApp::View::HTML | instance |
'-----------------------------------------------------------------+----------'
[debug] Loaded Private actions:
@@ -1018,12 +1016,12 @@
edit many individual files.
-=head2 Configure TT.pm For The Wrapper
+=head2 Configure HTML.pm For The Wrapper
In order to create a wrapper, you must first edit your TT view and
tell it where to find your wrapper file.
-Edit you TT view in C<lib/MyApp/View/TT.pm> and change it to match the
+Edit you TT view in C<lib/MyApp/View/HTML.pm> and change it to match the
following:
__PACKAGE__->config(
@@ -1176,7 +1174,7 @@
Hit "Reload" in your web browser and you should now see a formatted
version of our basic book list. (Again, the development server should
have automatically restarted when you made changes to
-C<lib/MyApp/View/TT.pm>. If you are not using the "-r" option, you will
+C<lib/MyApp/View/HTML.pm>. If you are not using the "-r" option, you will
need to hit C<Ctrl-C> and manually restart it. Also note that the
development server does I<NOT> need to restart for changes to the TT and
static files we created and edited in the C<root> directory -- those
@@ -1585,7 +1583,7 @@
$c->stash(template => 'books/list.tt2');
Then delete the C<TEMPLATE_EXTENSION> line in
-C<lib/MyApp/View/TT.pm>.
+C<lib/MyApp/View/HTML.pm>.
Check the L<http://localhost:3000/books/list> URL in your browser.
It should look the same manner as with earlier sections.
Modified: Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/05_Authentication.pod
===================================================================
--- Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/05_Authentication.pod 2010-04-07 04:33:32 UTC (rev 13140)
+++ Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/05_Authentication.pod 2010-04-07 12:57:12 UTC (rev 13141)
@@ -205,7 +205,7 @@
| MyApp::Model::DB::Role | class |
| MyApp::Model::DB::User | class |
| MyApp::Model::DB::UserRole | class |
- | MyApp::View::TT | instance |
+ | MyApp::View::HTML | instance |
'-------------------------------------------------------------------+----------'
...
Modified: Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/07_Debugging.pod
===================================================================
--- Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/07_Debugging.pod 2010-04-07 04:33:32 UTC (rev 13140)
+++ Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/07_Debugging.pod 2010-04-07 12:57:12 UTC (rev 13141)
@@ -348,7 +348,7 @@
If you run into issues during the rendering of your template, it might
be helpful to enable TT C<DEBUG> options. You can do this in a Catalyst
environment by adding a C<DEBUG> line to the C<__PACKAGE__->config>
-declaration in C<lib/MyApp/View/TT.pm>:
+declaration in C<lib/MyApp/View/HTML.pm>:
__PACKAGE__->config({
TEMPLATE_EXTENSION => '.tt2',
More information about the Catalyst-commits
mailing list