On Mar 29, 2005, at 2:39 AM, Tim Bunce wrote:
$dbh-prepare($sql, { Callbacks = { prepare = sub { ... } });
...well, I guess it'd be pretty dumb to do that.
Not if you remember that the (or at least _a_ plan) plan is to rework
$dbh-prepare so it looks like this:
sub prepare {
On Mar 29, 2005, at 12:11 PM, Tim Bunce wrote:
Well, I was kinda hoping your next contribution might be an
implementation of $h-{SetUTF8} :-) That would be much faster.
[Look back in the archives for details.]
D'oh!
Anybody got any spare tuits they can give me? :-)
Is there a way to
set it on an
On Mar 23, 2005, at 2:01 AM, Tim Bunce wrote:
I can certainly live with that. Are return values currently ignored?
An exception will be thrown if anything is returned.
Okay, good to note in the docs.
I think I'd be inclined to have them mean nothing, and leave it up to
callbacks to throw
On Tue, Mar 22, 2005 at 04:46:33PM -0800, David Wheeler wrote:
YES! :-)
:)
On Mar 22, 2005, at 4:21 PM, Tim Bunce wrote:
The return; is because I've not decided how to interpret return values
so to avoid problems later I've mandated that callbacks must return
nothing.
I can certainly
On Tue, Feb 22, 2005 at 09:12:00AM -0800, David Wheeler wrote:
That's great. You've got it to the point were I can't ignore it any
more :-) I'll apply it and finish it up.
Woo! That's what I was looking for! Time well spent, then. :-) I'll
have to look at the diff after you've done it to
On 23 Mar, Tim Bunce wrote:
What's missing, roughly in order of importance...
0. Documentation.
1. callbacks are only passed the handle, not the other method args.
2. No support for post-call callbacks via
$dbh-{Callbacks}-{prepare} = [ \pre, \post ]
3. The method name isn't
YES! :-)
On Mar 22, 2005, at 4:21 PM, Tim Bunce wrote:
It ended up a little different in that I don't use an extra element
in the struct but just hv_fetch Callbacks when needed.
So it's more like the way Profile is handled. I should have pointed
you in that direction rather than to the older
On Mar 22, 2005, at 4:46 PM, David Wheeler wrote:
Anyway, it's in now, with support for callbacks on *every* method
and *every* handle. So this does what you'd expect:
$dbh-{Callbacks}-{ping} = sub { print Called ping!\n; return;
};
$dbh-ping;
Nice.
And they work! :-)