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

From: Peter Speltz (peterspeltz at yahoo.com)
Date: Wed Nov 24 2004 - 04:06:55 GMT


--- Simon Flack <sf at flacks.net> wrote:

> On Tue, 23 Nov 2004 08:57:39 -0800 (PST), Peter Speltz wrote
> > Is it possible to get $r data in a before_create trigger?
> >

> > Would you have to write your trigger at run time with data you want
> > from $r? Would that be efficient or too inefficient to be practical?
>
> AIUI, you can't add a before_create trigger at runtime on an object. E.g.

What's AIUI?

> 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!
>
> In the first instance, if you call that multiple times (over multiple
> requests), you'll add many triggers, all with different copies of $r.
>
> --simonflk
>

I see your point. My logic was flawed. A pretty silly idea really. A deadline
has me rushing. Note to self, quit rushing :) . Thanks for clearing that up.

=====
pjs

                
__________________________________
Do you Yahoo!?
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com

_______________________________________________
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