Thanks all for your input. I have the require working OK now, although I have two questions:

1). The two forms of require are:

require MODULE; require "MODULE.pm";
The first form (according to the book) translates '::' to '/' (on Unix systems), and also treats indirect object notation as methods, whereas the second form requires the '/' path separator and treats indirect object notation as basic function calls. So I really want the first form, so I need to call this with
eval "require $module";
Is this right?

2). I realize though that I need to perform some trickery with the symbol tables, I think. What I want is my module PmLoader.pm to take it's LIST input, and then find and load each of THOSE modules into the main package. As I have it now, it's loading these into the PmLoader package, but not into main. So, as was pointed out, when I say

use Pmloader qw( ...args ...);
it's the same as saying
BEGIN { require PmLoader; PmLoader->import( qw( ...args...)); }
But then in PmLoader's import method, if I only call
eval "require $module";
I'm missing the import. But the import needs to be done to main, not to package PmLoader. Can anyone give me a hint how to proceed here?
From the scriptorium annex,
-cadphile

In reply to Re: use/require $MODULE (a variable) by cadphile
in thread use/require $MODULE (a variable) by cadphile

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.