How would you use a chained dispatch to solve a problem like this?
Something that needs to be checked before allowing anything else
(besides logging in) to happen and if so force them to a specific page?
A simple example would help. I'm still have it in my head that this
logic should be done in the root controller since it would supersede any
action in my other controllers.
Thanks,
Rob
On 12/8/2010 8:31 AM, Tomas Doran wrote:
On 7 Dec 2010, at 16:11, Ben van Staveren wrote:
You want to $c-detach('end') -- unless that's the default these
days. I use this pattern a lot and the only difference I see is that
I do:
The end action will _always_ be run, there is no need to detach to the
end action.
However I'm not sure what doing $c-detach in auto will do (I guess
the same as returning 0 - i.e. stop further actions from running), but
I'm not sure - you should probably return 0 (to stop further dispatch)
rather than detaching in the auto action..
However as noted elsewhere in this thread, I'd seriously recommend
using Chained dispatch rather than auto for this (if for no other
reason then it avoids the re-entering auto in the next request after
you redirect issue).
Cheers
t0m
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive:
http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/