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

Matt S Trout dbix-class at trout.me.uk
Tue Oct 25 16:29:33 CEST 2005


On Mon, Oct 24, 2005 at 01:50:01PM +0100, Matthew Lawrence wrote:
> Drew Taylor wrote:
> >On 10/21/05, *Bill Moseley* <moseley at hank.org <mailto:moseley at hank.org>> 
> >wrote:
> >
> >    On Fri, Oct 21, 2005 at 09:31:25AM +0100, Matthew Lawrence wrote:
> >     > There's an undocumented method in Class::DBI called
> >    make_read_only that
> >     > adds a _croak trigger to the create, delete and update methods.
> >
> >    Is there a related method to remove those triggers?
> >
> >
> >I don't believe there is. After all, having it work both ways would 
> >basically undo the whole purpose of having readonly objects. IIRC, all 
> >you have to do is dispose of the object and retrieve it again - no 
> >readonly triggers in sight.
> >
> 
> Although if make_read_only is called on the class you can't do that. 
> e.g. if your class represents a view or some other table that should 
> never be modified.

That's ... gross.

If anybody fancies working up a saner implementation of this feature for
DBIx::Class there'd be help from me and a commit bit available :)

-- 
     Matt S Trout       Specialists in Perl consulting, web development, and
  Technical Director    UNIX/Linux systems architecture and automation. Mail
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