Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: sub DESTROY: Strange ordering of object destruction

by ELISHEVA (Prior)
on Mar 03, 2011 at 11:57 UTC ( #891211=note: print w/replies, xml ) Need Help??

in reply to Re: sub DESTROY: Strange ordering of object destruction
in thread sub DESTROY: Strange ordering of object destruction (SOLVED)

Code reduction is certainly the gold standard but in this case the class is very complicated and doing it right would take some time. I posted because I was looking for background knowledge or experience with DESTROY that might explain the situation and allow me to avoid that, or at least, ensure that I was checking for the right things when I parred away code.

In this case, asking first proved quite fruitful. First, confirmed my suspicion that objects are deleted in indeterminant order during global destruction. Secondly, it caused me to question my assertion that destruction was in fact happening before the global destruction phase.

Had I reduced the code first, I would have been using inadequate tools to determine the order of destruction, and so my reduced code, for all the work it would have caused, would not have provided any more information than the more complex code.

Had the consensus been that there was likely a bug, I most certainly would have gone the code reduction route, if only to produce a repeatable test case. A bug report without a test case is the pits.

  • Comment on Re^2: sub DESTROY: Strange ordering of object destruction

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://891211]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2021-03-04 19:58 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (107 votes). Check out past polls.