On Apr 25, 2008, at 9:03 AM, Ian Docherty wrote:
I use Chained exclusively and don’t use the Perl package namespace as a mapping to the URI namespace at all, only for logically grouping related functionality. Usually the two still correspond to some extent of course, but I don’t feel any need to force a correspondence.
I have considered that, but felt that with several developers a 'hard rule' which mapped the
Perl package namespace to URI namespace avoided potential chaos.

I may reconsider in light of your comment. Would you care to give an example of
where you would choose *not* to map one-to-one?

I'm in the same camp for the most part. I'll have a Controller::Article but have its chain root be "a" for the short URIs.

You can also then have C::Admin::Article which doesn't dispatch to / admin/article but chains from /a/[id]/edit /a/[id]/preview /a/[id]/ rev/[#] and so on. Then a single auto method (if the setup is that simplistic) in Admin.pm can check authn/authz for everything in it.


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to