
pjf at roxsoft
Mar 20, 2013, 8:21 AM
Post #2 of 2
(166 views)
Permalink
|
On 20/03/13 09:11, David Schmidt wrote: > I want to visit/forward to an action and that action is endpoint of a > chain. so in order for the action to work correctly the entire chain > has to be processed. How can I do that without using visit()? So you have two or more chains. Each chain begins by stashing $c->model( 'whatever' ), followed by making one or more calls to $c->stash->{whatever_ref}->some_method1, ...->some_method2 and so on No calls to go, visit, or forward. This thin controller / fat model approach results in controller actions that typically contain only one line of code, a call to a model method. The model will probably require an ACCEPT_CONTEXT method to stash a weaken'd reference to $c. The model methods can then take input from $c->req and output to $c->stash -- Regards _______________________________________________ Catalyst-dev mailing list Catalyst-dev [at] lists http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
|