OK, so importing M1, M3, M2 in that order makes M2 fail with VERSION being not found, right? It's not complaining that the version number is bad, but that the VERSION function is not found at all, which is strange for a couple of reasons: (1) it works in other modules, and (2) if it was not defined it would be found in UNIVERSAL.
But, it is calling M3::import in this case.
I'm wondering if M3::import caused something to be changed (incorrectly) in M2, not just in C3 as intended. That "clobber the wrong thing" could explain my first observation, that a function was not being called, if the symbol table entry for that function were altered.
What makes me suspect a compiler bug or other bizzare issue is that commenting out something that will happen later changes the behavior.
Maybe using Dumper on the symbol table to see if/when something unexpected changes...I'm glad it's friday.
—John
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.