At 12:30 PM -0800 3/15/04, Larry Wall wrote:
On Sat, Mar 13, 2004 at 08:39:02PM +0100, James Mastros wrote:
: Larry Wall wrote:
: >And how would it differ from END?  You can't predict when the last
: >time a module is going to get used...
:
: Unless we support an explicit unload action on modules.  This seems
: highly useful for long-running processes.  (I don't think making them
: DODable is useful, since there's no way to tell if a future eval STRING
: (or equiv) might be useful.)

Then the explicit unload can call an explicit routine in the module
for cleanup, I suspect.

That's going to be the only way to reasonably unload a module, and even then there'll be some interesting repercussions. Like... what happens when you unload a module with instantiated objects? How can you tell if there are secondary modules that need unloading? Does unloading actually unload, or just remove as many links to the module as we can and we then unload it when the last real reference to it goes away? Can we *re*load a module that's been unloaded? (The answer to that last one's no, for some modules that load in external libraries)


It's an interesting problem. Modules leave debris around which can make it difficult to properly deal with, and allowing them to be unloaded requires a fair amount of thought.
--
Dan


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

Reply via email to