[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua 5.2 beta: default module path incompatibility
- From: Dirk Laurie <dpl@...>
- Date: Tue, 20 Sep 2011 13:04:27 +0200
It just took me 30 minutes of debugging time to realize that the reason
my enhancements to mboxparser.lua worked under Lua 5.1.4 but not under
Lua 5.2 was that the current version was not being used at all.
Reason:
The default set in luaconf.h for both package.path and package.cpath
in Lua 5.2.0 beta puts the present working directory last, whereas in
Lua 5.1.4 it was put first.
The change seems not to be documented under either "Changes since Lua 5.1"
or in the reference manual itself.
It is difficult to understand why this change has been made. It causes
any application distributed with customized versions of packages that
happen to installed system-wide to break unless the application explicitly
sets the path.
Since the change is undocumented, I sincerely hope it is a bug.
Dirk