First: I don't mean to be rude or anything, but let's not pick on words. When we used the word "Parent" here, we meant either using SUPER or writing the specific name of the parent class, which in this particular case would be "Control": $self->Control::DESTROY(). And use strict; use warnings; are implied! If I didn't show them in my code sample, it's only for the purpose of saving space and making it more readable to allow to concentrate on the original problem and not getting side-tracked.

Second: What's that "must" all about? Are you implying that would solve the original problem? Let's see... the parent class is tied to the database, the child class is tied to the database, child's DESTROY() method is executed first and saves changes to the database, but then parent's DESTROY() method is executed, which overwrites the changes. So, unfortunately "must" doesn't do any good here.


In reply to Re: Re: Inheritance and objects tied to a database by relax99
in thread Inheritance and objects tied to a database by relax99

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.