[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: bundled packages
- From: Diego Nehab <diego@...>
- Date: Fri, 31 Mar 2006 17:49:32 -0500 (EST)
Hi,
In my implementation, package.alias is only used if the cRoot and RC loaders
cannot find a package; in that case it effectively re-tries cRoot and RC with
package.alias.name as the filename, again using cpath.
What does the RC loader do? The same as the C loader, but trying to get
the chunk from a resource name that is a function of the subpackage
name?
I have played games with the preload table, but to work in all cases (eg
require a.b.c), the preload table needs to be filled in for all sub-modules.
I am trying out the alias approach (which can still be an add-on loader) so
that package.alias.mime=socket will resolve correctly for require"mime.xyz",
without needing a whole slew of entries.
How about playing tricks with the metatable of package.preload? You
should be able use pattern matching to resolve names.
[]s,
Diego.