lua-users home
lua-l archive

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


> The current "LOADPATH?" thread made me remember of a small issue I
> noticed a couple of months ago.
> The new library function package.searchpath(name, path) should have
> its second argument optional.
> When not specified, it should look into package.path and
> package.cpath, like function require().

The "and" in your proposal explains why there is no default. Should
it look on both pathes? In which order? Or only one? Which one? All
these cases seem quite common. (Moreover, 'require' itself may
search in other places, if the program adds other searchers.)

-- Roberto