finalising default and index :Private expurgation
[catagits/Catalyst-Manual.git] / lib / Catalyst / Manual / Cookbook.pod
index d115523..0aa6dc5 100644 (file)
@@ -160,36 +160,27 @@ You configure your application with the C<config> method in your
 application class. This can be hard-coded, or brought in from a
 separate configuration file.
 
-=head3 Using YAML
+=head3 Using Config::General
 
-YAML is a method for creating flexible and readable configuration
-files. It's a great way to keep your Catalyst application
-configuration in one easy-to-understand location.
+L<Config::General|Config::General> is a method for creating flexible
+and readable configuration files. It's a great way to keep your
+Catalyst application configuration in one easy-to-understand location.
 
-In your application class (e.g. C<lib/MyApp.pm>):
+Now create C<myapp.conf> in your application home:
 
-  use YAML;
-  # application setup
-  __PACKAGE__->config( YAML::LoadFile(__PACKAGE__->config->{'home'} . '/myapp.yml') );
-  __PACKAGE__->setup;
-
-Now create C<myapp.yml> in your application home:
-
-  --- #YAML:1.0
-  # DO NOT USE TABS FOR INDENTATION OR label/value SEPARATION!!!
-  name:     MyApp
+  name     MyApp
 
   # session; perldoc Catalyst::Plugin::Session::FastMmap
-  session:
-    expires:        '3600'
-    rewrite:        '0'
-    storage:        '/tmp/myapp.session'
+  <Session>
+    expires 3600
+    rewrite 0
+    storage /tmp/myapp.session
+  </Session>
 
   # emails; perldoc Catalyst::Plugin::Email
   # this passes options as an array :(
-  email:
-    - SMTP
-    - localhost
+  Mail SMTP
+  Mail localhost
 
 This is equivalent to:
 
@@ -208,7 +199,7 @@ This is equivalent to:
   # configure email sending
   __PACKAGE__->config->{email} = [qw/SMTP localhost/];
 
-See also L<YAML>.
+See also L<Config::General|Config::General>.
 
 =head1 Skipping your VCS's directories
 
@@ -731,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;
     }
@@ -1282,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.
@@ -1294,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