[Catalyst-commits] r12904 -
Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial
hkclark at dev.catalyst.perl.org
hkclark at dev.catalyst.perl.org
Tue Feb 16 19:37:18 GMT 2010
Author: hkclark
Date: 2010-02-16 19:37:18 +0000 (Tue, 16 Feb 2010)
New Revision: 12904
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:
Move mention of different "stash styles" to Ch2
Switch to consistent attribute style (":Name" vs. ": Name") as per changes started in early chapters
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-02-16 19:33:32 UTC (rev 12903)
+++ Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/02_CatalystBasics.pod 2010-02-16 19:37:18 UTC (rev 12904)
@@ -442,7 +442,28 @@
and look at L<http://localhost:3000/hello> in your again. You
should see the template that you just made.
+B<Note:> You will probably run into a variation of the "stash"
+statement above that looks like:
+ $c->stash->{template} = 'hello.tt';
+
+Although this style is still relatively common, the approach we
+used previous is becoming more common because it allows you to
+set multiple stash variables in one line. For example:
+
+ $c->stash(template => 'hello.tt', foo => 'bar',
+ another_thing => 1);
+
+You can also set multiple stash values with a hashref:
+
+ $c->stash({template => 'hello.tt', foo => 'bar',
+ another_thing => 1});
+
+Any of these formats work, but the C<$c-E<gt>stash(name =E<gt> value);>
+style is growing in popularity -- you may wish to use it all the
+time (even when you are only setting a single value).
+
+
=head1 CREATE A SIMPLE CONTROLLER AND AN ACTION
Create a controller named "Site" by executing the create script:
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-02-16 19:33:32 UTC (rev 12903)
+++ Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod 2010-02-16 19:37:18 UTC (rev 12904)
@@ -1547,7 +1547,7 @@
=cut
- sub list : Local {
+ sub list :Local {
# Retrieve the usual Perl OO '$self' for this object. $c is the Catalyst
# 'Context' that's used to 'glue together' the various components
# that make up the application
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-02-16 19:33:32 UTC (rev 12903)
+++ Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/05_Authentication.pod 2010-02-16 19:37:18 UTC (rev 12904)
@@ -465,7 +465,7 @@
# Note that 'auto' runs after 'begin' but before your actions and that
# 'auto's "chain" (all from application path to most specific class are run)
# See the 'Actions' section of 'Catalyst::Manual::Intro' for more info.
- sub auto : Private {
+ sub auto :Private {
my ($self, $c) = @_;
# Allow unauthenticated users to reach the login page. This
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-02-16 19:33:32 UTC (rev 12903)
+++ Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/07_Debugging.pod 2010-02-16 19:37:18 UTC (rev 12904)
@@ -118,7 +118,7 @@
"left-justify" my debug statements so I don't forget to remove them, but
you can obviously indent them if you prefer):
- sub list : Local {
+ sub list :Local {
# Retrieve the usual Perl OO '$self' for this object. $c is the Catalyst
# 'Context' that's used to 'glue together' the various components
# that make up the application
More information about the Catalyst-commits
mailing list