better patch Re: trigger documentation bug?

[prev] [thread] [next] [Date index for 2004/12/22]

From: Ryan Tate
Subject: better patch Re: trigger documentation bug?
Date: 22:17 on 22 Dec 2004
That last patch had a couple of issues. This one is better:


apocalypse.OCF.Berkeley.EDU [170] diff -b DBI.pm MyDBI.pm
1786,1788c1786
< specify the order in which they will be run. Each will be passed the
< object being dealt with (whose values you may change if required),
< and return values will be ignored.
---
> specify the order in which they will be run. 
1790,1792c1788,1791
< All triggers are passed the object they are being fired for.
< Some triggers are also passed extra parameters as name-value pairs.
< The individual triggers are documented with the methods that trigger them.
---
> All triggers are passed the object they are being fired for, except
> when C<before_set_$column> is fired during L</create>, in which case the
> class is passed in place of the object, which does not yet exist.  You
> may change object values if required.
1793a1793,1796
> Some triggers are also passed extra parameters as name-value
> pairs. The individual triggers are further documented with the methods
> that trigger them.
> 
1976,1978c1979,1983
< checking any constraints that may have been set up. The
< C<after_set_$column> trigger is invoked after the new value has been
< stored.
---
> checking any constraints that may have been set up. When called on an
> existing object, C<before_set_$column> is passed: ($self, 
> $new_value => {$column => $new_value}). When called during L</create>,
> C<before_set_$column> is passed: ($class, $new_value => {$column =>
> $new_value}).
1979a1985,1987
> The C<after_set_$column> trigger is invoked after the new value has
> been stored.
>

better patch Re: trigger documentation bug?
Ryan Tate 22:17 on 22 Dec 2004

Generated at 12:15 on 16 Jan 2005 by mariachi v0.52