Re: [Fwd: Re: Handle Creation with new_child()]

2005-02-22 Thread Tim Bunce
On Mon, Feb 21, 2005 at 04:10:29PM -0800, David Wheeler wrote: On Feb 21, 2005, at 2:17 PM, Tim Bunce wrote: Which is also pretty easily done, eh? Something like this? Yes, though I wouldn't bother validating the contents of the hash. Just checking you're getting a hash ref is enough I

Re: [Fwd: Re: Handle Creation with new_child()]

2005-02-22 Thread David Wheeler
On Feb 22, 2005, at 1:54 AM, Tim Bunce wrote: True. The 'if ref' was a little over the top though. If the user messes with the contents of $h-{Callbacks} then they get what they've asked for. Note that the STORE code for Callbacks only gets fired in a few situations. Specifically, doing

Re: [Fwd: Re: Handle Creation with new_child()]

2005-02-21 Thread David Wheeler
On Feb 21, 2005, at 2:17 PM, Tim Bunce wrote: Which is also pretty easily done, eh? Something like this? Yes, though I wouldn't bother validating the contents of the hash. Just checking you're getting a hash ref is enough I think. Well, I figured it was faster to do it up-front (during the

Re: [Fwd: Re: Handle Creation with new_child()]

2005-02-15 Thread David Wheeler
On Feb 14, 2005, at 3:14 AM, Tim Bunce wrote: In relation to connect_cached it boiled down to just the difference between: if ($dbh and my $oc = $dbh-{OnConnect}) { $oc-($dbh, $dsn, $user, $pass, $attr) if ref $oc eq 'CODE'; } and: if (my $cb = $dbh-{Callbacks}) { my $oc =

Re: Handle Creation with new_child()

2005-02-15 Thread David Wheeler
On Feb 14, 2005, at 3:09 AM, Tim Bunce wrote: Yes. That much should be trivial for them. The more tricky issue is that it affects how attributes are handles. Currently the drivers connect() method can process the contents of \%attr directly. Many support connect() atributes that are not supported

Re: Handle Creation with new_child()

2005-02-15 Thread Tim Bunce
On Tue, Feb 15, 2005 at 10:38:20AM -0800, David Wheeler wrote: On Feb 14, 2005, at 3:09 AM, Tim Bunce wrote: [On the roadmap/todo there's an item about recording the names of all attributes that have been set on a handle. That may also be useful here so drivers can be led by what attributes

Re: Handle Creation with new_child()

2005-02-15 Thread David Wheeler
On Feb 15, 2005, at 2:22 PM, Tim Bunce wrote: I'll drink to that! If you'll be at the MySQL conference in April then I'll be buying. Sadly I won't be going to OSCON this year as it clashes with other commitments. Pity, we'll miss you. I won't be at the MySQL conference. I don't often use MySQL.

Re: Handle Creation with new_child()

2005-02-14 Thread Tim Bunce
On Sun, Feb 13, 2005 at 05:54:40PM -0800, David Wheeler wrote: On Feb 13, 2005, at 2:44 PM, Tim Bunce wrote: The DBD::_::connect method then becomes just something like my $dbh = $drh-new_child($attr) or return; $dbh-connect(...) or return; return $dbh; then we kindly

[Fwd: Re: Handle Creation with new_child()]

2005-02-13 Thread Michael A Chase tech
I'd meant to sent this to the list. Sorry. On 02/12/2005 07:35 PM, David Wheeler said: On Feb 12, 2005, at 10:11 AM, Tim Bunce wrote: That's starting to get might complex, isn't it? Uh, mite. :-) Or mighty, perhaps. Quite. So, I'm looking at your new_child() stuff, instead. I'm

Re: [Fwd: Re: Handle Creation with new_child()]

2005-02-13 Thread David Wheeler
On Feb 13, 2005, at 2:51 PM, Tim Bunce wrote: Maybe the answer it to not allow changing attributes on a cached handle. That's already the rule and would not change. Er, that's news to me. Uh, sorry, I was thinking of the resetting of AutoCommit. Different applications use handle caching for

Re: Handle Creation with new_child()

2005-02-13 Thread David Wheeler
On Feb 13, 2005, at 2:44 PM, Tim Bunce wrote: So, I'm looking at your new_child() stuff, instead. That's a much bigger can of worms! (And one that's hard to tell how deep it is before you really get into it. Driver migration issues may be painful, for example.) Hrm. No :) Having per-class

Handle Creation with new_child()

2005-02-12 Thread David Wheeler
On Feb 12, 2005, at 10:11 AM, Tim Bunce wrote: That's starting to get might complex, isn't it? Uh, mite. :-) Or mighty, perhaps. Quite. So, I'm looking at your new_child() stuff, instead. I'm not entirely clear on how to implement it (DBI-connect() seems pretty complex--necessary?), but it seems