lua-users home
lua-l archive

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


On 20 July 2015 at 15:23, Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote:
> To avoid multiple instances of the same module, package.loaded on Windows
> should contain only lowercase package names.
>
> -- Egor

The file system isn't the only place modules are loaded from.
e.g. the symbols are looked for in the current DLL.
Or a person might install a new package searcher that e.g. downloads
something over http (which is case sensitive... sometimes)
Or anything else really.
For a list of default package 'searchers' (term was 'loaders' in 5.1 era),
see http://www.lua.org/manual/5.3/manual.html#pdf-package.searchers

In addition to that, there are ways to turn on case sensitivity on windows
e.g.  HKLM\SYSTEM\CurrentControlSet\Control\Session
Manager\kernel\dword:ObCaseInsensitive
So lua shouldn't just assume that windows == case insensitive anyway.


IMO, there isn't actually a problem to be fixed here:
Your module shouldn't mind if it gets loaded more than once.