Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Dev

bug: visit() calling end()

 

 

Catalyst dev RSS feed   Index | Next | Previous | View Threaded


davewood at gmx

Mar 20, 2013, 2:11 AM

Post #1 of 2 (183 views)
Permalink
bug: visit() calling end()

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()?


According to the documentation visit() should not call end() (POD &&
http://ion0.com/hx/redispatch.png)

t/aggregate/live_component_controller_action_visit.t explicitely tests
for more then one end() though.


cheers
david

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


pjf at roxsoft

Mar 20, 2013, 8:21 AM

Post #2 of 2 (166 views)
Permalink
Re: bug: visit() calling end() [In reply to]

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

Catalyst dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.