[Catalyst-commits] r12687 - Catalyst-Runtime/5.80/branches/action_args/lib/Catalyst

jnapiorkowski at dev.catalyst.perl.org jnapiorkowski at dev.catalyst.perl.org
Tue Jan 19 15:52:50 GMT 2010


Author: jnapiorkowski
Date: 2010-01-19 15:52:49 +0000 (Tue, 19 Jan 2010)
New Revision: 12687

Modified:
   Catalyst-Runtime/5.80/branches/action_args/lib/Catalyst/Controller.pm
Log:
tweaked docs based on IRC suggestions

Modified: Catalyst-Runtime/5.80/branches/action_args/lib/Catalyst/Controller.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/action_args/lib/Catalyst/Controller.pm	2010-01-19 15:37:51 UTC (rev 12686)
+++ Catalyst-Runtime/5.80/branches/action_args/lib/Catalyst/Controller.pm	2010-01-19 15:52:49 UTC (rev 12687)
@@ -448,33 +448,21 @@
 
 =head2 action_args
 
-Allows you to set instantiation arguments on your custom Actions or ActionRoles.
-You can set args globally (shared across all actions) and specifically (for a
-single action).
+Allows you to set constructor arguments on your Actions or ActionRoles.  You can
+set args globally (all actions of the controller) and specifically (for a single
+action).
 
-    package MyApp::Web::Controller::MyController;
-    use parent 'Catalyst::Controller';    
-
     __PACKAGE__->config({
         action_args => {
             '*' => {globalarg1=>'hello', globalarg2=>'goodbye'},
             'specific_action' => {customarg=>'arg1'},
-        },      
+        },
      });
-    
-    sub specific_action :Path('') ActionClass('CustomActionClass') {}
-    
-    1;
 
-In the case above, your 'CustomActionClass' would get passed the following
-arguments when it is instantiated: (globalarg1=>'hello', globalarg2=>'goodbye',
-'customarg=>'arg1').  Please note that the order the arguments are passed are not
-certain to be in the order declared.
+In the case above the action class associated with 'specific_action' would get
+passed the following arguments when it is instantiated: (globalarg1=>'hello',
+globalarg2=>'goodbye', 'customarg=>'arg1').
 
-As with all other configuration hashes, you can set values inline with your
-controller (as above) or centrally via a configuration file (such as you might
-use with the ConfigLoader plugin).
-
 =head1 METHODS
 
 =head2 BUILDARGS ($app, @args)




More information about the Catalyst-commits mailing list