[Catalyst] So, what things make Catalyst cool for you?

Sam Vilain sam at vilain.net
Sun Oct 30 22:02:28 CET 2005


On Sat, 2005-10-29 at 23:14 +0100, Pedro Melo wrote:
> > 1. The method to uri mapping is just awesome. :)
> >     sub foo : Path('/index.html') {}
> >     sub foo : Global {}
> >     sub foo : Local {}
> >     sub foo : Regex('^(.*)\.html$') {}
> this is one of the best things. It makes a very clean code base with 
> enforced separation of actions per method.

It also could make finding entry points for a given path very hard in an
application which is "somebody else's".

How is resolving this typically solved on a Catalyst code base?  Do you
compile the app and ask it for its URI mapping, or simply "try to keep
it under control" ?

In my own URI to handler mapper (on CPAN as PSA::Cache), I use a
convention that mirrors CGI in style - URIs simply get resolved to
relative pathnames, with path_info and "index" feature equivalents.  In
this instance, I preferred convention over flexibility.  It did have its
drawbacks; for instance moving paths around was often a PITA.  But it
sure was simple to explain and understand.

Sam.




More information about the Catalyst mailing list