[Catalyst] arguments to default methods

Perrin Harkins perrin at elem.com
Wed Jun 22 20:00:17 CEST 2005


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 CRUD
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.

- Perrin




More information about the Catalyst mailing list