[Catalyst] auto() confusion [in 5.33]
Chisel Wright
chisel at herlpacker.co.uk
Fri Nov 11 18:03:22 CET 2005
On Fri, Nov 11, 2005 at 08:22:06AM -0800, Bill Moseley wrote:
> On Fri, Nov 11, 2005 at 03:31:18PM +0000, Chisel Wright wrote:
> > I'm a tad confused with the arguments that get passed to auto().
> >
> > sub list : Local {
> > my ($self, $c, $controller, $action, $client_id) = @_;
> >
> > $c->stash->{template} = 'report/list.tt';
> > }
>
> You only are passed the arguments, not the controller and action.
>
> When you access a default action then the arguments are the entire
> path, not just the arguments.
Yeah, I corrected this, but the problem was with the arguments being
passed to auto()
Before I added the list() function it was seeing 'report', 'list', '15'
After I added the list() function it was only seeing '15'.
What I don't grok is why adding a new function affects the arguments
being passed to a different, already written, function.
Should I be movind to using names parameters int he URL? I just want to
run a check in auto() that boils down to "is this user allowed to view
this client?"
It's not so easy when the client-id value moves around in:
sub auto : Private {
my ($self,$c, at other_stuff) = @_;
}
--
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/
More information about the Catalyst
mailing list