Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2014-11-29 04:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (203 votes), past polls