At 02:04 PM 2/1/2001 -0500, Ken Fox wrote:
>Dan Sugalski wrote:
> > At 12:33 PM 2/1/2001 -0500, Michael G Schwern wrote:
> > > Have a look at AnyLoader in CPAN.
> >
> > Looks pretty close to what's needed. Care to flesh it out (and streamline
> > it where needed) to a PDD?
>
>Isn't the trick to detect the necessary modules at compile time? Run-time
>can always be handled with a UNIVERSAL AUTOLOAD -- it doesn't need to be
>part of the core. Run-time autoload should be a replaceable module like
>the debugger. (Perhaps the presence of an AUTOLOAD should turn off compile-
>time autoloading too?)

Nope, no trick at all. The parser will have a list of functions--if it sees 
function X, it loads in module Y. (Possibly version Z) Nothing fancy needs 
to be done.

>We're also going to need MakeMaker support for updating the registry of
>sub name -> module mappings. We don't want to force full module names for
>everything. Maybe the EXPORT list should be registered without module
>names and the EXPORT_OK list with module names?

The list of functions that trigger this automagic use-ing of modules should 
be reasonably small. The point of this is *not* to eliminate all the "use 
Foo;" in code, rather it's a mechanism to extend the (possibly smallish) 
set of builtin functions without requiring extra "use Foo;"s.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to