[Catalyst] arguments to default methods

Sebastian Riedel sri at oook.de
Thu Jun 23 19:37:11 CEST 2005

Am 22.06.2005 um 20:00 schrieb Perrin Harkins:

> On Wed, 2005-06-22 at 13:17 +0200, Sebastian Riedel wrote:
>> default actions get all uri arguments.
>> sub default : Private {
>>      my ( $self, $c, @args ) = @_;
>>      # @args should be qw/petitioneditor list/
>> thats because default actions are inheritable...
> Okay.  What I was trying to accomplish is something similar to the  
> module, where all the methods go through some common setup code for
> setting the template, etc. before running the requested method.  Is  
> this
> better done with auto than default?  (Actually it doesn't look like  
> it.)
> It's no big deal to shift off the first arg, and makes this code more
> reusable than a global action would be, so I'll just do that.

It depends, i prefer default for subdispatching but a Local action  
may be ok too.
auto actions are chained, so they're mostly used for authentication,  
like Mason autohandlers.


More information about the Catalyst mailing list