lua-users home
lua-l archive

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


It was thus said that the Great Soni They/Them L. once stated:
> Hello,
> 
> We are wondering, if it would be possible to support foo.lua.d/bar.lua 
> for require("foo.bar").
> 
> See, Linux really really wants file-dir duality. You can tell by all the 
> .d/'s everywhere. Unfortunately POSIX forbids file-dir duality. So .d/'s 
> everywhere is the best we're gonna get. But it'd be nice to see them 
> more widely supported.

  I'm not exactly sure what you are asking for, but this layout does work
for me:

	foo.lua
	foo/
		bar.lua

and the Lua code:

	local foo = require "foo"
	local bar = require "foo.bar"

works.  It even works for shared objects:

	foo.so
	foo/
		bar.so

  Unless you can go into more details about what you are trying to achieve.

  -spc