From: Tim Bunce [mailto:[EMAIL PROTECTED]
> On Mon, Feb 16, 2004 at 07:46:49PM -0600, Jay Hannah wrote:
> ...it seems that it is being thrown in global destruction in the 2 DBD's 
> I use the most...
> > DBD::Informix -> Informix 9.3:            Issuing rollback() for database...
> > DBD::Informix -> Informix SE (ancient):   No warning
> > DBD::Sybase -> freetds -> MS-SQL server:  Issuing rollback() for database...
> > DBD::Proxy -> DBD::Oracle -> Oracle (v?): No warning
> > DBD::Oracle -> Oracle (v?):               No warning
> > DBD::mysql:                               No warning
> 
> I suspect in some of the cases you quote above AutoCommit is not off,
> or the DESTROY is happening during global destruction.

The tests above were all global destruction. perldoc DBI:

   Also, do not rely on the order of object destruction 
   during "global destruction", as it is undefined.

It may be undefined, but it does appear reliable for my one server. I get the same 
pattern every time I run my test.

In any event, harkening back to my Programmer X example last night I believe what I'm 
inquiring about is the ability to turn on a flag in DBI so any implicit DESTROYs of 
$dbh's and $sth's would bark.

But if "global destruction order is undefined" means that no such feature could ever 
be reliable then I withdraw my inquiry because the majority of the cases where I'd 
want the feature would be during global destruction (our "sloppy code"). 

Do I understand that correctly?

Thanks,

j


Reply via email to