On Mon, Mar 25, 2013 at 06:11:33PM -0700, Linda W wrote:
> ----
> use mem doesn't load modules.
>
> if it is put *in* a module, it directs perl to use the "in memory" copy
> of the module rather
> than searching for it on disk **when**, a user does a "use" of that
> module, later in the file.
Well, given everybody on this list apparently had the same misunderstanding,
I think it probably needs a different name.
Am I right that you're trying to create something where -
package Foo;
use Some::Thing;
is equivalent to
package Foo;
$INC{"Foo.pm"} = __FILE__;
?
The last time I implemented that I called it register_inc_entry() and made it
a subroutine exported by my class builder.
I eventually went back to writing it by hand, because I pretty much only use
it in testing code and I prefer that to be as simple/obvious as possible.
Perhaps Inlined::Package or something similar would be appropriate as a name?
--
Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue
http://shadowcat.co.uk/blog/matt-s-trout/ http://twitter.com/shadowcat_mst/
Email me now on mst (at) shadowcat.co.uk and let's chat about how our Catalyst
commercial support, training and consultancy packages could help your team.