Yes sure, I see what you mean, but I think you're kinda mixing two separate issues here — so it wasn't immediately clear to me, with which you wanted help.

For one, there's the question of how to avoid to inadvertendly import stuff into your namespace that might clash with something else (this is what I tried to answer).

Then, there's the problem of accidentally introducing something in the inheritance hierarchy which does interfere with the so far established lookup mechanics in the code. For the latter problem it's irrelevant whether you import access from POSIX, or whether you yourself happen to write a new routine MyCGI::access. If it's found first along the inheritance chain for a certain type of object, it will be called - that's it. I don't think there's much you can do to prevent this from possibly happening within the standard Perl5 OO framework.

OTOH, I have to say that I personally cannot remember to have ever encountered that type of problem in practice within the last decade of my programming in Perl5 (and I've used quite a number of modules during that time). But maybe I just don't recall the incidence, because it was trivial to diagnose and fix... Dunno.


In reply to Re^3: Need help with clashing method names by almut
in thread Need help with clashing method names by dk

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.