- Made :Path behave sanely at the root, hopefully
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index 77aa8e9..0ba2c4d 100644 (file)
@@ -54,7 +54,7 @@ __PACKAGE__->engine_class('Catalyst::Engine::CGI');
 __PACKAGE__->request_class('Catalyst::Request');
 __PACKAGE__->response_class('Catalyst::Response');
 
-our $VERSION = '5.49_04';
+our $VERSION = '5.49_05';
 
 sub import {
     my ( $class, @arguments ) = @_;
@@ -116,10 +116,6 @@ Catalyst - The Elegant MVC Web Application Framework
     # called for /bar/of/soap, /bar/of/soap/10, etc.
     sub bar : Path('/bar/of/soap') { ... }
 
-    # called for / and only /, no other args
-    sub baz : Path  { ... } 
-    sub baz : Index { ... }
-
     # called for all actions, from the top-most controller inwards
     sub auto : Private { 
         my ( $self, $c ) = @_;
@@ -142,8 +138,11 @@ Catalyst - The Elegant MVC Web Application Framework
     # called for /foo/bar
     sub bar : Local { ... }
     
-    # overrides /foo, but not /foo/1, etc.
-    sub index : Path { ... }
+    # called for /blargle
+    sub blargle : Global { ... }
+    
+    # an index action matches /foo, but not /foo/1, etc.
+    sub index : Private { ... }
     
     ### in MyApp/Controller/Foo/Bar.pm
     # called for /foo/bar/baz
@@ -227,8 +226,6 @@ controller of the current action.
 
 Returns the current L<Catalyst::Request> object.
 
-    my $req = $c->req;
-
 =back
 
 =head2 Processing and response to the current request
@@ -300,8 +297,6 @@ sub error {
 
 Returns the current L<Catalyst::Response> object.
 
-    my $res = $c->res;
-
 =item $c->stash
 
 Returns a hashref to the stash, which may be used to store data and pass it
@@ -342,9 +337,8 @@ Contains the return value of the last executed action.
 
 =item $c->component($name)
 
-Gets a component object by name.
-
-    $c->comp('MyApp::Model::MyModel')->do_stuff;
+Gets a component object by name.  This method is no longer recommended.
+$c->controller, $c->model, and $c->view should be used instead.
 
 =cut
 
@@ -359,7 +353,8 @@ sub component {
 
         my @names = (
             $name, "${appclass}::${name}",
-            map { "${appclass}::${_}::${name}" } qw/M V C/
+            map { "${appclass}::${_}::${name}" } 
+           qw/Model M Controller C View V/
         );
 
         foreach my $try (@names) {