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 not entirely clear on how to implement it (DBI->connect() seems pretty complex--necessary?), but it seems to be the best approach to getting what I want (no resetting of attributes in connect_cached()). Is it as simple as:
>
> sub new_child {
> my $handle = shift;
> my $child = bless {}, 'SomePackage';
> # Set attributes....
> return $child;
> }
>
> ? And the modifying connect() and friends to use it, perhaps instead of the $connect_closure?



Does a handle know its cached? Maybe the answer it to not allow changing attributes on a cached handle.


--
Mac :})
** I usually forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.
--- Begin Message ---
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 not entirely clear on how to implement it (DBI->connect() seems pretty complex--necessary?), but it seems to be the best approach to getting what I want (no resetting of attributes in connect_cached()). Is it as simple as:

  sub new_child {
      my $handle = shift;
      my $child = bless {}, 'SomePackage';
      # Set attributes....
      return $child;
  }

? And the modifying connect() and friends to use it, perhaps instead of the $connect_closure?

Does a handle know its cached? Maybe the answer it to not allow changing attirbutes on a cached handle.


--
Mac :})
** I usually forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.


--- End Message ---


Reply via email to