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

Mailing List Archive: Catalyst: Dev

A forwarding detach within auto continues processing

 

 

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


tonvoon at gmail

May 4, 2011, 9:41 AM

Post #1 of 3 (807 views)
Permalink
A forwarding detach within auto continues processing

Hi!

In my app, I have an auto action which forwards to another location to do some common work. In this forwarded action, a $c->detach("/soft_error") is run if a known error condition has occurred.

However, it seems that running the detach from an auto doesn't stop further processing as Catalyst continues the dispatch.

I've attached a testcase (diff off 5.80032) to demonstrate the issue. I've updated t/aggregate/live_component_controller_action_auto.t and created a new test controller Detach.pm.

If I run $c->detach from the forwarded action, this seems to be fine. It is only if I pass an action to detach that the problem occurs. And only if run from auto.

Is this correct behaviour or have I found a bug?

Ton
Attachments: detach_from_forwarded_auto_continues_processing.diff (4.09 KB)


tonvoon at gmail

May 6, 2011, 12:52 AM

Post #2 of 3 (774 views)
Permalink
Re: A forwarding detach within auto continues processing [In reply to]

On 4 May 2011, at 17:41, Ton Voon wrote:

> Hi!
>
> In my app, I have an auto action which forwards to another location to do some common work. In this forwarded action, a $c->detach("/soft_error") is run if a known error condition has occurred.
>
> However, it seems that running the detach from an auto doesn't stop further processing as Catalyst continues the dispatch.
>
> I've attached a testcase (diff off 5.80032) to demonstrate the issue. I've updated t/aggregate/live_component_controller_action_auto.t and created a new test controller Detach.pm.
>
> If I run $c->detach from the forwarded action, this seems to be fine. It is only if I pass an action to detach that the problem occurs. And only if run from auto.
>
> Is this correct behaviour or have I found a bug?
>
> Ton
>
> <detach_from_forwarded_auto_continues_processing.diff>

For information, I was speaking to mst on IRC and we worked through a patch for this in Catalyst->execute. This has been committed into master: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Runtime.git;a=commitdiff;h=2688734f3a611b95e5c1f82c0c248c462d1eaa6b

Ton


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


bobtfish at bobtfish

Jul 24, 2011, 8:05 AM

Post #3 of 3 (606 views)
Permalink
Re: Re: A forwarding detach within auto continues processing [In reply to]

On 6 May 2011, at 08:52, Ton Voon wrote:

> For information, I was speaking to mst on IRC and we worked through
> a patch for this in Catalyst->execute. This has been committed into
> master: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Runtime.git;a=commitdiff;h=2688734f3a611b95e5c1f82c0c248c462d1eaa6b

Thanks, this looks fine to me, and it'll be in the next release.

Thanks for the patch!

Cheers
t0m


_______________________________________________
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.