[Catalyst-commits] r11640 - Catalyst-Runtime/5.80/trunk/lib/Catalyst

poisonbit at dev.catalyst.perl.org poisonbit at dev.catalyst.perl.org
Tue Oct 20 20:12:51 GMT 2009


Author: poisonbit
Date: 2009-10-20 20:12:46 +0000 (Tue, 20 Oct 2009)
New Revision: 11640

Modified:
   Catalyst-Runtime/5.80/trunk/lib/Catalyst/Upgrading.pod
Log:
Example added to #Actions_in_your_application_class



Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Upgrading.pod
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Upgrading.pod	2009-10-20 10:29:49 UTC (rev 11639)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Upgrading.pod	2009-10-20 20:12:46 UTC (rev 11640)
@@ -307,10 +307,28 @@
 =head2 Actions in your application class
 
 Having actions in your application class will now emit a warning at application
-startup as this is deprecated. It is highly recommended that these actions are moved
+startup as this is deprecated.It is highly recommended that these actions are moved
 into a MyApp::Controller::Root (as demonstrated by the scaffold application
-generated by catalyst.pl)
+generated by catalyst.pl 
 
+This warning, also affects tests. You should move actions in your test, creating a myTest::Controller::Root, like the following example:
+
+    package MyTest::Controller::Root;
+    
+    use strict;
+    use warnings;
+    
+    use parent 'Catalyst::Controller';
+    
+    __PACKAGE__->config(namespace => '');
+    
+    sub action : Local {
+        my ( $self, $c ) = @_;
+        $c->do_something; 
+    }
+    
+    1;
+
 =head2 ::[MVC]:: naming scheme
 
 Having packages called MyApp::[MVC]::XX is deprecated and can no longer be generated




More information about the Catalyst-commits mailing list