Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by ELISHEVA (Prior)
on Mar 03, 2011 at 11:57 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-03-29 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found