Re: [Maypole] Access to $r in CDBI before_create trigger ?

From: Drew Taylor (taylor.andrew.j at gmail.com)
Date: Wed Nov 24 2004 - 18:50:12 GMT


On Wed, 24 Nov 2004 07:36:04 +0000, Tony Bowden <tony-maypole at kasei.com> wrote:
> On Wed, Nov 24, 2004 at 01:13:08AM +0000, Simon Flack wrote:
> > AIUI, you can't add a before_create trigger at runtime on an object. E.g.
> > you'll add a before_create trigger like this:
> > __PACKAGE__->add_trigger(before_create => \&...);
> > not like this:
> > $object->add_trigger(before_create => \&...); # It's already created!
>
> Technically you *can* add triggers to objects. It's how the 'write only
> object' ability in Class::DBI works, for example.
>
> However, adding a before_create trigger to an object doesn't make a lot
> of sense as the object won't exist, in order to add the trigger, until
> you have already called create() on it ...

Did you mean read only instead of write only? It looks like
make_read_only() is still not documented. Any plans to make it
official?

Drew

-- 
----------------------------------------------------------------
 Drew Taylor                 *  Web development & consulting
 Email: drew at drewtaylor.com  *  Site implementation & hosting
 Web  : www.drewtaylor.com   *  perl/mod_perl/DBI/mysql/postgres
 ----------------------------------------------------------------

_______________________________________________ maypole mailing list maypole at lists.netthink.co.uk http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT