[Catalyst] sample code for feedback
perrin at elem.com
Thu Jun 23 22:41:37 CEST 2005
On Thu, 2005-06-23 at 22:35 +0200, Jose Nyimi wrote:
> Indeed, the first think that bother my eyes was the
> $self->view( $c, $c->req()->param('petition_id') ); call.
> For the purpose of showing the alternative, I would be putting
> in comment the forwarding Cat's style.
I would, if it supported passing parameters.
> $c->forward( 'view' , $c->req()->param('petition_id') );
> A correct syntax ?
No, that was the first thing I tried.
I suppose I could have the other action method check for this param if
it doesn't find the value in @_. That's probably the best approach.
Not being able to pass parameters directly in forward() feels sort of
limiting though, in terms of how easily you can reuse these methods.
More information about the Catalyst