Okay, here's the scoop, since nobody worked out anything much better.
The interpreter has a library array. We can stick it somewhere in the interpreter structure and hang it off the interpinfo op to get to it.
Each element in the array is a sub PMC. The prototype is:
int loader(string)
The return is:
1 - no good, try the next entry in the array 0 - Good, done -1 - good, try the next entry in the array anyway exception - something went wrong
The string parameter is the unqualified name of the library to load. The parameter is explicitly writable so filter entries can mess with it if they want.
If the last entry in the array returns non-zero, then a library load fail exception is thrown.
This does mean that each plain directory in the library path has to have what's essentially a closure backing it which is capable of loading in a file from disk into the interpreter, but I'm OK with that. It'll make wedging in more active library loading code easier in general, which is fine.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk