Account Options

  1. Sign in
Google Groups Home
« Groups Home
$dbh->{CachedKids}
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
David E . Wheeler  
View profile  
 More options May 2 2008, 4:23 pm
Newsgroups: perl.dbi.dev
From: da...@kineticode.com (David E . Wheeler)
Date: Fri, 2 May 2008 13:23:33 -0700
Local: Fri, May 2 2008 4:23 pm
Subject: $dbh->{CachedKids}
Howdy,

I started getting test failures for Exception::Class::DBI on Perl 5.6  
recently. The failures seem to be due to this test:

# For some reason, under perl < 5.8.0, $dbh->{Kids} returns a  
different value
# inside the HandleError scope than it does outside that scope. So we're
# checking for the perl version here to cover our butts on this test.  
This may
# be fixed in the DBI soon.
is( $err->kids, ($] < 5.008 ? 1 : 0), "Check kids" );

Was this fixed in the DBI? If so, in what version (I saw a change to  
CachedKids in 1.55 that looked close, but that's not the same as  
{kids}, is it?)?

Thanks,

david


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Bunce  
View profile  
 More options May 2 2008, 6:24 pm
Newsgroups: perl.dbi.dev
From: Tim.Bu...@pobox.com (Tim Bunce)
Date: Fri, 2 May 2008 23:24:39 +0100
Local: Fri, May 2 2008 6:24 pm
Subject: Re: $dbh->{CachedKids}
You've not given me much to go on, but I'd guess it's related to the
timing of when perl invokes the DESTROY method (which has changed
between perl versions). In which case it may be mostly beyond the
control of the DBI.

A small self-contained example that behaves differently between
different DBI/Perl versions will buy you more of my time :)

Tim.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David E. Wheeler  
View profile  
 More options May 2 2008, 10:03 pm
Newsgroups: perl.dbi.dev
From: da...@kineticode.com (David E. Wheeler)
Date: Fri, 2 May 2008 19:03:10 -0700
Local: Fri, May 2 2008 10:03 pm
Subject: Re: $dbh->{CachedKids}
On May 2, 2008, at 15:24, Tim Bunce wrote:

> You've not given me much to go on, but I'd guess it's related to the
> timing of when perl invokes the DESTROY method (which has changed
> between perl versions). In which case it may be mostly beyond the
> control of the DBI.

> A small self-contained example that behaves differently between
> different DBI/Perl versions will buy you more of my time :)

Sorry Tim, I was hoping that that would be enough to shake some  
neurons loose for an easy answer. Here is my original query about this  
issue:

   http://aspn.activestate.com/ASPN/Mail/Message/perl-DBI-Dev/1359462

And here is your relevant reply:

   http://aspn.activestate.com/ASPN/Mail/Message/perl-DBI-dev/1449508

Only now I'm seeing that test fail on 5.6.2. Is it possible that 5.6.2  
destroys the handle by the type the do() is called? I don't see your  
comment in 07kids.t anymore.

Thanks,

David


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Bunce  
View profile  
 More options May 9 2008, 7:42 am
Newsgroups: perl.dbi.dev
From: Tim.Bu...@pobox.com (Tim Bunce)
Date: Fri, 9 May 2008 12:42:20 +0100
Local: Fri, May 9 2008 7:42 am
Subject: Re: $dbh->{CachedKids}

Seems likely.

> I don't see your comment in 07kids.t anymore.

Got removed in May 2004
http://svn.perl.org/viewvc/modules/dbi/trunk/t/07kids.t?r1=333&r2=335

If you really need to capture the complete state at the time the error
*is recorded* rather than the time its *checked for and thrown* then
you could use HandleSetErr instead of HandleError:

http://search.cpan.org/~timb/DBI-1.604/DBI.pm#HandleSetErr_(code_ref,...)

Tim.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David E. Wheeler  
View profile  
 More options May 9 2008, 12:22 pm
Newsgroups: perl.dbi.dev
From: da...@kineticode.com (David E. Wheeler)
Date: Fri, 9 May 2008 09:22:19 -0700
Local: Fri, May 9 2008 12:22 pm
Subject: Re: $dbh->{CachedKids}
On May 9, 2008, at 04:42, Tim Bunce wrote:

>> Only now I'm seeing that test fail on 5.6.2. Is it possible that  
>> 5.6.2
>> destroys the handle by the type the do() is called?

> Seems likely.

Yes, I've released a new version where the test checks for $] > 5.6.1  
instead of > 5.8.0.

Hrm. I guess it wasn't telling us much, since it's dependent on Perl  
versions, rather than the implementation of the DBI.

> If you really need to capture the complete state at the time the error
> *is recorded* rather than the time its *checked for and thrown* then
> you could use HandleSetErr instead of HandleError:

> http://search.cpan.org/~timb/DBI-1.604/DBI.pm#HandleSetErr_(code_ref,...)

Interesting, I hadn't seen that. As for my uses, I just wanted to get  
my tests passing again. No one has complained about the state of the  
error information in Exception::Class::DBI, to my knowledge. So I  
think I'll leave it as-is.

Best,

David


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »