sub data : Chained CaptureArgs(2) { my ( $self, $c, $model, $object ) = @_; # ... $c->stash( model => $model, object => $object ); } sub list : PathPart Chained('data') { my ( $self, $c ) = @_; my $model = $c->stash->{model}; my $object = $c->stash->{object}; # ... $c->stash( json_data => [ $c->model($model)->resultset($object)->all ] ); }