in reply to destroying object

Just a note: DESTROY functions aren't guaranteed to occur in any order. Not saying anything about your solution, just a comment in general.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

Replies are listed 'Best First'.
Re^2: destroying object (order)
by tye (Sage) on Mar 30, 2004 at 19:17 UTC

    Perl objects only get destroyed in the wrong order during 'global destruction'. If you avoid globals (enough to get your objects destroyed before 'global destruction' kicks in), then your objects get destroyed in a sensible order, always.

    I also consider this a bug in Perl, even though it has existed for a very long time.

    - tye