ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-dbi-dev
perl-dbi-dev
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved