Dynaloader uses AUTOLOAD. Since you have said that MyModule is a Dynaloader, it means that if you call a function in the MyModule class, and it can't be found, Perl is going to search the Dynaloader package as well. Now, Perl also has the rule that if a function isn't found in a package, Perl will search for an AUTOLOAD function instead. These behaviours are not mutally excluded. Basically what happens if you call a function my_func in the package MyModule is:
  1. Search for the function my_func in MyModule. If found, call it. Else:
  2. Search for the function my_func in any of the packages inherited by MyModule. This is done in a depth-first order. If a function is found, call it. Else:
  3. Search for the function my_func in the UNIVERSAL package. If found, call it. Else:
  4. Search for the function AUTOLOAD in MyModule. If found, call it. Else:
  5. Search for the function AUTOLOAD in any of the packages inherited by MyModule. This is done in a depth-first order. If an AUTOLOAD function is found, call it. Else:
  6. Search for the function AUTOLOAD in the UNIVERSAL package. If found, call it. Else:
  7. Produce a fatal (but trappable) error about a function not found.
It's case 5 that's trapping this warning.

Abigail


In reply to Re: AUTOLOAD inheritance by Abigail-II
in thread AUTOLOAD inheritance by gri6507

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.