Re: Order of before_delete trigger in docs

[prev] [thread] [next] [Date index for 2005/06/27]

From: William Ross
Subject: Re: Order of before_delete trigger in docs
Date: 20:52 on 27 Jun 2005
On 27 Jun 2005, at 20:54, Tony Bowden wrote:

> On Mon, Jun 27, 2005 at 12:23:43PM -0400, Charles Bailey wrote:
>
>> I'm not sure you can count on this -- I think the order of  
>> execution is
>> officially indeterminate.  Tony would (of course) have the  
>> authoritative
>> word here.
>>
>
> Actually, the official word here belongs to Miyagawa. Class::DBI just
> uses Class::Trigger.
>
> From what I can see the triggers are stored as a hashref, although
> they're spliced off in twos, and new ones are pushed onto the end,  
> so it's
> really treated as a list. The only thing that appears to be guaranteed
> from the code is that object triggers take precedence over class  
> triggers.

it's a hash of lists. the splice in add_trigger is just used to push  
trigger coderefs onto the right list, and after that it's basically

     for my $trigger (@{ $all_triggers->{$when} }) { ... }

so one can be fairly sure that the coderefs are executed in the order  
in which they're passed to add_trigger.


will

ps. it is all quite miyagawan in there, though.

(message missing)

Order of before_delete trigger in docs
Bill Moseley 17:32 on 26 Jun 2005

Re: Order of before_delete trigger in docs
Tony Bowden 18:56 on 26 Jun 2005

Re: Order of before_delete trigger in docs
Marius Feraru 01:34 on 27 Jun 2005

Re: Order of before_delete trigger in docs
Bill Moseley 07:22 on 27 Jun 2005

Re: Order of before_delete trigger in docs
Tony Bowden 07:35 on 27 Jun 2005

Re: Order of before_delete trigger in docs
Marius Feraru 07:44 on 27 Jun 2005

Re: Order of before_delete trigger in docs
Tony Bowden 07:47 on 27 Jun 2005

Re: Order of before_delete trigger in docs
Marius Feraru 07:54 on 27 Jun 2005

Re: Order of before_delete trigger in docs
Marius Feraru 12:35 on 27 Jun 2005

Re: Order of before_delete trigger in docs
William Ross 14:03 on 27 Jun 2005

Re: Order of before_delete trigger in docs
Bill Moseley 15:11 on 27 Jun 2005

Re: Order of before_delete trigger in docs
Charles Bailey 16:23 on 27 Jun 2005

Re: Order of before_delete trigger in docs
William Ross 19:37 on 27 Jun 2005

Re: Order of before_delete trigger in docs
Tony Bowden 19:54 on 27 Jun 2005

Re: Order of before_delete trigger in docs
William Ross 20:52 on 27 Jun 2005

Generated at 16:37 on 28 Jul 2005 by mariachi v0.52