in reply to Committing database transactions with DESTROY

This is probably the same global destruction problem I described at Re (tilly) 1: Tie & Destroy, OOP. In that thread I suggested a general solution which you can find at Class::FlyweightWrapper which (with considerable overhead) allows you to get around the issue in a different way (albeit with considerable overhead).
  • Comment on Re (tilly) 1: Committing database transactions with DESTROY

Replies are listed 'Best First'.
(Ovid) Re(2) 1: Committing database transactions with DESTROY
by Ovid (Cardinal) on Oct 16, 2001 at 22:11 UTC

    Reading through those threads, what I'm getting is the impression that Generic::Database::DESTROY can be garbage collected before Generic::Database::Modify objects are being collected, thus ensuring that there is no DESTROY method to inherit from. Is this correct? If so, this would explain some of the inconsistent results that I have been getting.

    Cheers,
    Ovid

    Vote for paco!

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

      I think it more likely that your database handle is cleaned up before you destroy $self. Which makes your commit fail.