[Catalyst] Model go boom in 5.66
Brandon Black
blblack at gmail.com
Tue Mar 14 17:36:34 CET 2006
On 3/14/06, Christopher H. Laco <claco at chrislaco.com> wrote:
> For the JMIW camp:
>
> $c->view('') / $c->view(undef)
>
> return the first view if there is only 1 view
> return the TT view if there are 2+ views, and one is TT
>
There are alternatives to TT that people might use as their "main"
html-generating view though. Things like HTML::Template or Seamstress
for example.
I like the idea of returning the only view if only one is defined, and
it probably doesn't really hurt to do it for model as well just for
consistency's sake (the same could be said for controller as well, but
I doubt it would ever be very useful).
How about optional app-level config parameters "default_view", and
"default_model". Calling ->view/model/controller with a false
argument returns the default if that's set in config, or returns the
only model/view if there's only one, or gives up if multiple and no
configured default?
-- Brandon
More information about the Catalyst
mailing list