in reply to Devel::GC::Helper + DBI
as mentioned is the right way to deal with thissub DBI::FIRSTKEY { () };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Devel::GC::Helper + DBI
by Anonymous Monk on Oct 17, 2006 at 22:07 UTC | |
Just today, after 2 years of DBI use w/o this problem, it pops up. Occurs during compile -- a 'use' of an application module is sufficient to set it off. 'use DBI' by itself does not trigger the problem. I haven't touched any of the modules associated w/ the perl installation, v. 5.8.7 from Activestate. I have been changing my application code, but the same sort of changes as usual. I have replaced the Perl install dir w/ a backup from a few days ago -- problem persists. SDE is Komodo, which has been getting into "Not Responding" mode more than usual. After adding the method to the top-level scope of DBI, the error message about not being able to locate FIRSTKEY.al goes away, BUT compile is kicked out from DBI, now with no message. AND: The current DBI module has the FIRSTKEY() on line 1335, below the top scope of DBI.pm; see below. The previous version of DBI, v 11.43 2004/02/01, has the same code. Adding the recommended sub DCL does not change things.
Code tags and formatting added by GrandFather | [reply] [d/l] |
|
Re^2: Devel::GC::Helper + DBI
by quelquun (Initiate) on Oct 17, 2006 at 22:26 UTC | |
Occurs during compile -- a 'use' of an application module is sufficient to set it off. 'use DBI' by itself does not trigger the problem. I haven't touched any of the modules associated w/ the perl installation, v. 5.8.7 from Activestate. I have been changing my application code, but the same sort of changes as usual. I have replaced the Perl install dir w/ a backup from a few days ago -- problem persists. SDE is Komodo, which has been getting into "Not Responding" mode more than usual. After adding the method to the top-level scope of DBI, the error message about not being able to locate FIRSTKEY.al goes away, BUT compile is kicked out from DBI, now with no message. AND: The current DBI module has the FIRSTKEY() on line 1335, below the top scope of DBI.pm; see below. The previous version of DBI, v 11.43 2004/02/01, has the same code. Adding the recommended sub DCL does not change things. *********************************************************** *********************************************************** <c> # $Id: DBI.pm 6755 2006-08-06 21:21:03Z timbo $ # vim: ts=8:sw=4 # # Copyright (c) 1994-2004 Tim Bunce Ireland ... # -------------------------------------------------------------------- # === OPTIONAL MINIMAL BASE CLASSES FOR DBI SUBCLASSES === # We only define default methods for harmless functions. # We don't, for example, define a DBD::_::st::prepare() { package # hide from PAUSE DBD::_::common; # ====== Common base class methods ====== use strict; # methods common to all handle types: sub _not_impl { my ($h, $method) = @_; $h->trace_msg("Driver does not implement the $method method.\n"); return; # empty list / undef } # generic TIEHASH default methods: sub FIRSTKEY { } sub NEXTKEY { } sub EXISTS { defined($_[0]->FETCH($_1)) } # XXX undef? sub CLEAR { Carp::carp "Can't CLEAR $_[0] (DBI)" } *********************************************************** *********************************************************** <c/> | [reply] |
by quelquun (Initiate) on Oct 18, 2006 at 01:00 UTC | |
The culprit was in application code: an exit() located at top-level module scope rather than inside a sub. I saw a similar post w/ the same symptom, but not related to DBI. So looks like this is a matter of poor perl handling of exit() during program load, rather than a bug w/ DBI. CPAN should be able to close bug #21112: Inheritance causes odd behavior. | [reply] |