[Catalyst-commits] r7851 - / trunk/Catalyst-Manual
trunk/Catalyst-Manual/lib/Catalyst/Manual
trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial
zarquon at dev.catalyst.perl.org
zarquon at dev.catalyst.perl.org
Thu May 29 01:01:54 BST 2008
Author: zarquon
Date: 2008-05-29 01:01:54 +0100 (Thu, 29 May 2008)
New Revision: 7851
Modified:
/
trunk/Catalyst-Manual/Changes
trunk/Catalyst-Manual/lib/Catalyst/Manual/Cookbook.pod
trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/Authentication.pod
Log:
r13334 at zaphod: kd | 2008-05-29 10:01:25 +1000
finalising default and index :Private expurgation
Property changes on:
___________________________________________________________________
Name: svk:merge
- 1b129c88-ebf4-0310-add9-f09427935aba:/local/catalyst:4278
1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst:13331
3b9770f9-e80c-0410-a7de-cd203d167417:/local/catalyst:3514
dd8ad9ea-0304-0410-a433-df5f223e7bc0:/local/Catalyst:6909
+ 1b129c88-ebf4-0310-add9-f09427935aba:/local/catalyst:4278
1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst:13334
3b9770f9-e80c-0410-a7de-cd203d167417:/local/catalyst:3514
dd8ad9ea-0304-0410-a433-df5f223e7bc0:/local/Catalyst:6909
Modified: trunk/Catalyst-Manual/Changes
===================================================================
--- trunk/Catalyst-Manual/Changes 2008-05-28 23:45:17 UTC (rev 7850)
+++ trunk/Catalyst-Manual/Changes 2008-05-29 00:01:54 UTC (rev 7851)
@@ -1,6 +1,7 @@
Revision history for Catalyst-Manual
5.7012
+ - Expurgation of all use of default :Private and index :Private in favour of default :Path and index :Path :Args(0)
- Expurgation of all yaml as configuration format
- Major updates to tutorial, thanks hkclark and gerda
Modified: trunk/Catalyst-Manual/lib/Catalyst/Manual/Cookbook.pod
===================================================================
--- trunk/Catalyst-Manual/lib/Catalyst/Manual/Cookbook.pod 2008-05-28 23:45:17 UTC (rev 7850)
+++ trunk/Catalyst-Manual/lib/Catalyst/Manual/Cookbook.pod 2008-05-29 00:01:54 UTC (rev 7851)
@@ -722,7 +722,7 @@
5. Add a XMLRPC redispatch method and an add method with Remote
attribute to lib/MyApp/Controller/API.pm
- sub default : Private {
+ sub default :Path {
my ( $self, $c ) = @_;
$c->xmlrpc;
}
@@ -1273,7 +1273,7 @@
to find out where it was the user was trying to go, you can look in
the request object using C<< $c->req->path >>.
- sub default : Private { .. }
+ sub default :Path { .. }
works for all unknown URLs, in this controller namespace, or every one
if put directly into MyApp.pm.
@@ -1285,7 +1285,7 @@
actions are defined, then index will be used instead of default and
Path.
- sub index : Private { .. }
+ sub index :Path :Args(0) { .. }
becomes
Modified: trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/Authentication.pod
===================================================================
--- trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/Authentication.pod 2008-05-28 23:45:17 UTC (rev 7850)
+++ trunk/Catalyst-Manual/lib/Catalyst/Manual/Tutorial/Authentication.pod 2008-05-29 00:01:54 UTC (rev 7851)
@@ -405,11 +405,11 @@
C<username> and C<password> values are not present in the form, the
user will be taken to the empty login form.
-Note that we could have used something like C<sub default :Path> (or
-even C<sub default : Private>; however, the use of C<default> actions
-is discouraged because it does not receive path args as with other
-actions. The recommended practice is to only use C<default> in
-C<MyApp::Controller::Root>.
+Note that we could have used something like C<sub default :Path>,
+however partly for historical reasons, and partly for code clarity it
+is generally recommended only to use C<default> in
+C<MyApp::Controller::Root>, and then mainly to generate the 404 not
+found page for the application.
Instead, we are using C<sub base :Path :Args(0) {...}> here to
specifically match the URL C</login>. C<Path> actions (aka, "literal
More information about the Catalyst-commits
mailing list