This is an attempt to gain some summary facts about objects and destructors, some of which I dont believe was covered in the OOP Tour de Force "Object-Oriented Perl" by Damian Conway. So basically I have a set of things here which I am inducing must be true based on what tye and merlin have said, but am not sure and could not find the answer else where and some of which I just thought up myself:
  1. It may be wise to use signal handlers to deal with this situation? Or will all Perl data and functions be destroyed by the time the signal to end the Perl program is sent?
  2. If class A has a reference to class B, then even though Perl DESTROYs are done in mem alloc order (as stated by merlyn, we can gain some control over the order of destruction by maintaining a reference to class B. However, this reference must be lexically scoped? Why?!

In reply to Re: order of destructor calls upon call of exit() by princepawn
in thread order of destructor calls upon call of exit() by princepawn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.