lua-users home
lua-l archive

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


> Certainly I'm missing something, but I just didn't get why it is 
> incompatible. If one sets cpath like:
> 
> package.cpath = "?.so;/usr/lib/lua/?.so;/usr/lib/lua/extramod.so"
> [...]
>  As Javier pointed out earlier, the new behavior (i.e. load their
> parents) could only be trigged if you cannot find "lib.bar" in cpath
> or path the way it is done now.

The point is that it will always "find" lib.bar: when looking for it,
it finds /usr/lib/lua/extramod.so and that ends the search.

Of course it will not find luaopen_lib_bar there, but currently this is
a "hard" error (it stops the searching). We could change that behavior,
but I don't think it is a good idea. If a real module lib.bar by any
accident does not have the function luaopen_lib_bar, the error message
would be "module not found". That would make people crazy...

-- Roberto