On Fri, May 02, 2008 at 07:03:10PM -0700, David E. Wheeler wrote: > 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?
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,_inherited) Tim.