His suggested change is to do a lowercase of the name, before doing the require. Which means that 'use File::Basename' and 'use File::BaseName' both reduce to requiring 'file::basename'. This means that duplicate checking in %INC gets captured.

His change however didn't involve anything with changing the package name. He didn't suggest that 'use My::Module' should be equivalent to:

BEGIN { require My::Module; # require does an lc of the name. (lc "My::Module") -> import; }
Not that this would work. Because "file::basename::import" doesn't exist. Or are you suggesting that in dragonchilds "fix" package names are automatically lowercased as well? And that Perl's rule of "variable names are case sensitive" is to be changed to "lexical variable names are case senstive, but package variables are only case sensitive after the list colon"? I certainly didn't read that in his post.

In reply to Re^4: What happens when you load the same module twice? by Anonymous Monk
in thread What happens when you load the same module twice? by periapt

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.