On 2002.08.19 14:47 Elizabeth Mattijsen wrote:
> At 02:37 PM 8/19/02 -0700, Randy J. Ray wrote:
> >>   use AutoLoader 'preload';  # preload anything you can find in %INC
> >>   use AutoLoader preload => { module => '' }; # all from specific module
> >>   use AutoLoader preload => { module => [qw(suba subb)] }; # only specific
> >>Would that make sense?
> >Problem with that approach is that it doesn't offer any control over whether
> >you are pre-loading or not. If you are going to pre-load a certain sub-set
> of
> >routines all the time, just put them above the __END__ token and don't
> burden
> >AutoLoader with new functionality at all.
> 
> Well, my C<use AutoLoader> would be _outside_ any of the loaded modules in
> the mod_perl startup.pl script after all the modules necessary for proper
> execution of _your_ mod_perl environment, are loaded.

I see... you mean to have a line like this:

     use AutoLoader preload => { module => [qw(suba subb)] };

be responsible for both including "module" (into the caller's namespace) *and* 
pre-loading the specified routines? That's different that what I had 
interpreted from your first idea. I though that the preload specification 
would be when the target module issues its call to "use AutoLoader".

 From this vantage point, it does make more sense, yes. Especially since 
module authors would no be responsible for retro-fitting to their packages. I 
would be interested to see if this can be done cleanly, without making 
AutoLoader.pm any harder to read than it currently is :-).

(OK, that might be asking a bit much...)

Randy
-- 
-------------------------------------------------------------------------------
Randy J. Ray     | Men occasionally stumble over the truth, but most of them
[EMAIL PROTECTED] | pick themselves up and hurry off as if nothing had happened.
+1 650 930-9097  |   -- Sir Winston Churchill

Reply via email to