Re: Time to Document Callbacks
by David Nicol other posts by this author
Oct 28 2009 2:32AM messages near this date
Re: Time to Document Callbacks
|
Re: Time to Document Callbacks
On Tue, Oct 27, 2009 at 2:50 PM, David E. Wheeler <david@[...].com> wrote:
> > Ideally I'd like to see an abstract interface for managing callbacks,
> > rather than the current "stuff it in a hash". That way future support
> > for post-method callbacks and multi-callbacks per method and handle
> > could be added without exposing (and locking us into) particular
> > implementation details.
>
> Do you have something in mind? What would it look like?
Trying to answer this for Tim, how about instead of
> >> $sth->{PostCallbacks}{fetch} = sub {
> >> my ($sth, $row) = @_;
> >> $row->[3] = DateTime::Format::Pg->parse_datetime($row->[3]);
> >> };
one would do
$sth-> AddPostCallback( fetch => sub {
my ($sth, $row) = @_;
$row-> [3] = DateTime::Format::Pg->parse_datetime($row->[3]);
});
dln
--
warlorded myself
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
|