lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Sean Conner <sean@conman.org> writes:
> We want to restart require() in effect, so it rescans package.path
> and package.cpath.  But there's no easy way of restarting require().
> I suppose we could call require() from within NETLOADER, but only if
> we know that the package has installed correctly.  If it falls
> through *again* to NETLOADER (for a given module X), then we have to
> return failure, else we get into an infinite loop.

It doesn't seem hard to recursively invoke require, after adding the
package in question to a global list of packages for which NETLOADER
should immediately fail.

[One question is whether packages in this list should be removed after
the recursive call returns, or just left there for future attempts...]

-miles

-- 
Insurrection, n. An unsuccessful revolution.