in reply to Re: DESTROY and DBI
in thread DESTROY and DBI
Mark, is $self properly blessed into the package? Otherwise, DESTROY would never be called...
It could also be the global cleanup order problem mentioned in this thread.
Have you tried using this class only from a subroutine? Take the part of the code at the top level that uses this class, and wrap it in a sub. Then put
If it's the random global cleanups causing the problem, having your variable as a lexical in the sub should get it cleaned up properly...$|=1; # make sure we see printouts and warns in order print "Before sub\n"; subThatUsesClass(); print "After sub, I _better_ have seen DESTROY happen...\n";
Edit: Put in correct link to tilly's excellent description of the global cleanup problem...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: DESTROY and DBI
by mce (Curate) on Aug 27, 2002 at 13:26 UTC | |
by RMGir (Prior) on Aug 27, 2002 at 14:01 UTC |