Hi Trevor, * Trevor Leffler <tleff...@uw.edu> [2015-02-07 00:00]: > Requests for non-extant paths fall through to Root->default(), which > gives the (undesired) default root view. I tried giving my top-level > controllers their own default() methods, but as others have found [1], > 'default() : Path' has precedence over 'index : Chained'.
package MyApp::Admin; sub default : Chained('base') PathPart('') { ... } package MyApp::Survey; sub default : Chained('base') PathPart('') { ... } Note how you don’t specify any particular number of arguments. So it will match any number of trailing URL segments. I *think* this will work. I haven’t tried it. However, contrary to what you claimed, splitting the app into multiple Cat apps joined together at the PSGI level *will* also work just fine. That will lead to requests for /admin/* always being dispatched to MyApp::Admin – which gets to have its own MyApp::Admin::Controller::Root with a `default` action that applies only to it. Likewise requests for /survey/* will always be dispatched to MyApp::Survey which equally has its own root controller with a `default` action that applies only to it. If the parts of your app are not closely related, this will be a more natural structure. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.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/