Re: Time to Document Callbacks
by Tim Bunce other posts by this author
Oct 29 2009 4:24PM messages near this date
Re: Time to Document Callbacks
|
Re: Time to Document Callbacks
On Wed, Oct 28, 2009 at 02:00:13PM -0700, David E. Wheeler wrote:
> On Oct 28, 2009, at 1:55 PM, Tim Bunce wrote:
>
> > If you're applying a callback to the "fetch" method and then your code
> > calls fetchrow_hashref, for example, how do you know if the driver's
> > fetchrow_hashref() method calls fetch() or fetchrow_arrayref()?
>
> Franky, if I've applied a callback to `fetch`, I don't expect it to be
> executed by `fetchrow_hashref`.
I could arrange for Callbacks to only apply to methods called by the
applicationi, and not to 'nested calls'. That's a fairly major change
after this length of time but given the limited use Callbacks have had,
and the lack of documentation, it's not out of the question.
The downside is that to intercept all fetched rows in a general way
(like some kind of plugin utility module might want to do) you now have
to add callbacks for 7 $sth fetch* methods and 6 $dbh select* methods.
Is that really preferable?
Tim.
Thread:
David E. Wheeler
Tim Bunce
David E. Wheeler
Tim Bunce
David E. Wheeler
David Nicol
Tim Bunce
David E. Wheeler
Tim Bunce
David E. Wheeler
Tim Bunce
David E. Wheeler
Tim Bunce
David E. Wheeler
H.Merijn Brand
Tim Bunce
David E . Wheeler
David E. Wheeler
David E. Wheeler
David E . Wheeler
|