patch Re: trigger documentation bug?
[prev]
[thread]
[next]
[Date index for 2004/12/22]
On Mon, 29 Nov 2004, Tim Bunce wrote:
> Send a patch.
This patch fixes the trigger documentation bug documented in my message to
the list in late November. URL:
http://groups.kasei.com/mail/arc/cdbi-talk/2004-11/msg00159.html
In addition, it adds a single sentence documenting the parameters supplied
to the trigger before_set_$column.
My diff (on SunOS 5.8) does not support -u or -B, so I hope this works. I
trust if it does not someone will email me:
apocalypse.OCF.Berkeley.EDU [169] 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 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,1980
< 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, and is passed:
> ($self, $new_value => {$column => $new_value}).
1979a1982,1984
> The C<after_set_$column> trigger is invoked after the new value has
> been stored.
>