OT: Templating systems (was RE: [Catalyst] New default screen for Catalyst)

Matthew Lawrence matthew.lawrence at ehsbrann.com
Fri Oct 21 10:31:25 CEST 2005

John Siracusa wrote:
> On 10/20/05 8:56 PM, Bill Moseley wrote:
>>On Fri, Oct 21, 2005 at 12:21:40PM +1300, Sam Vilain wrote:
>>>You can *enforce* that the separation is complete in other ways.  For
>>>instance, if you are using the Tangram model, then you simply don't pass
>>>in a storage handle to your template, so that no model changes are
>>>possible from the view.
>>I've often wondered how to do that with TT and CDBI combination.  Kind
>>Rather crude, but maybe wrap the $tt->process call in something that
>>disables everything except selects.
> Er, call me crazy, but I don't want my views doing selects either.  As far
> as I'm concerned, the only think a template is allowed to do is rearrange
> the data I pass it and synthesize values based on that data.  No selects, no
> db access at all.  How do I enforce it?  Er, code reviews, I guess :)

There's an undocumented method in Class::DBI called make_read_only that 
adds a _croak trigger to the create, delete and update methods.


More information about the Catalyst mailing list