Dan Sugalski wrote:
> 
> It's the explicit exporting that I'm concerned about. Perhaps I'm being 
> overly worried, but it strikes me that if all a module needs to do to get 
> on the autoload list is have an @EXPORT_AUTO declaration at the top (or 
> something similar) we're going to see it abused rather badly.

Hm. Then maybe that's something you don't allow.  I.e. if a module
Foo wants to define bar() that gets autoloaded when called as bar()
from main::, it has to define it in main:: (a practice which
is already strongly discouraged). Otherwise, it can be autoloaded
when called qualified as Foo::bar().  Otherwise, can't use the
automagical loading for that sub.  Eh?

And it seems strange to suggest it for packages like Foo anyway;
we already have autoloader.  And that just emphasizes that this
feature was meant for core functions.

And, btw, perhaps we need to provide a way to un-load a loaded
definition.  This would be needed for, eg., migratory code.
Or even just long-lived perl processes like mod_perl.

-- 
John Porter

A pessimist says the CPU is 50% utilized.
An optimist says the CPU is 50% unutilized.
A realist says the network is the bottleneck.

Reply via email to