I don't remember it always being that way...

You misremember. Perl 5 has worked that way for at least 12 years.

I don't remember that being required before 5.14 or maybe 5.12...

You misremember that too.

I've just given up on perl making sense and decided to code around everything that doesn't make sense -- it was too much work trying to figure out the 'why's....

The hows and whys have been in the documentation for years. Several people in this thread have tried to explain this to you. You will continue to struggle unless you decide to believe us.

So how does one tell Perl, in code that looks like perl code, and not some sort of assembler, that a 'use statement' should not go searching for files, but should use the 'in-memory' version instead?

You do so the same way you tell Perl that sort should load files and grep should shell out to Nethack. In other words, fundamental Perl 5 operations behave as they have been documented and implemented and tested and stable since the earliest versions of Perl 5.

You are working against Perl and doing things the hard way and your problems reflect that. You have trouble debugging your code because you're doing things the hard way. Why are you continually asking for advice and ignoring that advice?


In reply to Re^5: Correct syntax for using $INC to keep modules in same file by chromatic
in thread can't import using exporter by perl-diddler

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.