[Catalyst] Did $c->req->arguments processing change?

Sebastian Riedel sri at oook.de
Fri Nov 11 10:10:35 CET 2005


Am 11.11.2005 um 07:39 schrieb Bill Moseley:

> I'm trying to stay away from using default, but I have one controller
> where I still (try to) use default() like a normal/local action.
>
> On a default action the arguments include all the path segments, not
> just the parts after the "namespace".
>
> So to make it work like other actions I was shifting off the
> controller's namespace -- leaving just the arguments.  Basically
> doing this in an auto:
>
>     my @namespace = split m!/!, $c->action->namespace;
>     splice @{$c->req->arguments}, 0, @namespace;
>
> (although I was not using the handy $c->action->namespace).
>
> But that doesn't seem to have any effect any more.  That is
>
>     my $array = $c->req->arguments;
>     push @$array, "extra stuff";
>
> doesn't modify arguments.
>
>
> My fix is adding dummy arguments, something ugly like this for a
> two-level namespace:
>
> sub default : Private {
>     my ( $self, $c, $dummy, $dummy2, $table, $id, $action ) = @_;

Thanks for reporting this bug, fixed it and will commit as soon as i  
can access the svn server again.


--
sebastian




More information about the Catalyst mailing list