Re: Laziness
[prev]
[thread]
[next]
[Date index for 2004/07/15]
On Thu, Jul 15, 2004 at 09:39:02PM +0200, johanl@xxxxxxxxx.xxx wrote:
> At 15:51 2004-07-15, Tim Bunce wrote:
> > (where rows is the return value from the DBI execute() method).
> >
> > The trigger code can modify the discard_columns array to affect
> > which columns are discarded.
>
> Ah, I didn't understand the meaning of "discarding columns" and what it is
> for. Thanks!
>
> So, if I never want to re-select any columns, this would work?
>
> Class->add_trigger(after_update => sub {
> my ($self, %args) = @_;
> @{$args{discard_columns}} = ();
> });
Looks reasonable.
> If this is considered a normal idiom, I'll add it to the Wiki cookbook page.
With caveats, please. (In other words don't present it as a "good thing for everyone".)
Tim.
|
Laziness
Johan Lindstrom 19:03 on 12 Jul 2004
|