On Tue, Oct 27, 2009 at 2:50 PM, David E. Wheeler <[email protected]> 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