From: Kieren Diment Date: Thu, 29 May 2008 00:01:54 +0000 (+0000) Subject: finalising default and index :Private expurgation X-Git-Tag: v5.8005~293 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=commitdiff_plain;h=85d49fb613ae5aabb76647ec250e3d450fabb521;hp=4299d9f5d43af74cdd91f61d7b0d1a132995f377 finalising default and index :Private expurgation --- diff --git a/Changes b/Changes index e32ad12..3ca7936 100644 --- a/Changes +++ b/Changes @@ -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 diff --git a/lib/Catalyst/Manual/Cookbook.pod b/lib/Catalyst/Manual/Cookbook.pod index 192d3bd..0aa6dc5 100644 --- a/lib/Catalyst/Manual/Cookbook.pod +++ b/lib/Catalyst/Manual/Cookbook.pod @@ -722,7 +722,7 @@ later) and SOAP::Lite (for XMLRPCsh.pl). 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 @@ part of your namespace, you'll get an error page instead. If you want 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 @@ namespace of your controller. If index, default and matching Path actions are defined, then index will be used instead of default and Path. - sub index : Private { .. } + sub index :Path :Args(0) { .. } becomes diff --git a/lib/Catalyst/Manual/Tutorial/Authentication.pod b/lib/Catalyst/Manual/Tutorial/Authentication.pod index 1c3b9b8..66225d8 100644 --- a/lib/Catalyst/Manual/Tutorial/Authentication.pod +++ b/lib/Catalyst/Manual/Tutorial/Authentication.pod @@ -405,11 +405,11 @@ will stay at the login page but receive an error message. If the C and C 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 (or -even C; however, the use of C actions -is discouraged because it does not receive path args as with other -actions. The recommended practice is to only use C in -C. +Note that we could have used something like C, +however partly for historical reasons, and partly for code clarity it +is generally recommended only to use C in +C, and then mainly to generate the 404 not +found page for the application. Instead, we are using C here to specifically match the URL C. C actions (aka, "literal