On 9 Dec 2010, at 14:41, Thompson wrote:

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.

The simplest example I can think of - CatalystX::SimpleLogin provides / login/required and /login/not_required as chain bases.

Anything chained from /login/required requires login :)

Obviously, displaying the login page is _not_ chained from /login/ required (as otherwise you have the same issue as here)

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.

There is nothing special about the root controller that implies this.

It's just generally people put the start of their chains in the Root controller.

As demonstrated by the above example (with the chain starts in the Login controller), this isn't mandatory.

Does this help clarify?

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/

Reply via email to