Matt S Trout wrote:
> On Sat, Jun 16, 2007 at 08:37:46PM -0500, Jonathan Rockway wrote:
>> On Friday 15 June 2007 08:36:33 am Christopher H. Laco wrote:
>>
>>> OPTION #2: View::TT, View::Mason, View::**
>>> ----------------------------------------------
>>>
>>> PROS:
>>>
>>> Template() will be honored with the use of RenderView and the use of
>>> forwarding to a view manually (like in REST or other controller code).
>>>
>>> CONS:
>>>
>>> This has to be implemented in each View::** package that wants to
>>> support it.
>>>
>>> IF one changes from a view the support it, to one that doesn't,
>>> controllers go boom.
>>>
>> What we really need to do is add a utility method like template_name() to 
>> the 
>> Catalyst::View base class.  Even without the :Template attribute, there is 
>> code duplicated between every view that shouldn't be( $template = 
>> $c->action || $c->stash->{template} ). 
> 
> I was pondering a base class but it shouldn't be ::View itself, since ::View
> is a base for things like JSON views where the concept of a template doesn't
> (currently, anyway) make any sense.
> 

Well, if we're throwing things in the ring...

C::View::Templated

->template()

And some forms of:

->template_paths(\@)


that takes care of doin the pre/post additional_paths/INCLUDE/PATHS
jerkery...so views can all find their template paths from the same method...

-=Chris

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to