[Catalyst] Model go boom in 5.66
Matt S Trout
dbix-class at trout.me.uk
Tue Mar 14 17:56:10 CET 2006
Brandon Black wrote:
> 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?
Seconded, with the caveat that I think $c->controller() should return the
controller that $c->action comes from.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Catalyst
mailing list