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 Milind Gupta once stated:
> Hi,
>       Currently if package.path has a path like:
> 
> C:\a\b\c\..\?\d\?.lua

  Why add the parent directory?  This just translates to

	C:/a/b/?/d/?.lua [1]

> Then it require("mod") searches for
> 
> C:\a\b\c\..\mod\d\mod.lua  -> C:\a\b\mod\d\mod.lua
> 
> This is good.

  What is the extra directory buying you?  I fail to see the benefit of an
extra directory.

> require("mod.submod") searches for
> 
> C:\a\b\c\..\mod\submod\d\mod\submod.lua
> 
> It would be much better I think if it searched:
> 
> C:\a\b\c\..\mod\d\mod\submod.lua

  What about a module named "org.conman.syslog"?

  -spc

[1]	Contrary to what Windows people may believe, Windows can support
	paths with '/'.  No, really!  It can.  It has since MS-DOS 2.0
	(1982).  It's only the shell, COMMAND.COM that can't [2]

[2]	And it can if you call a MS-DOS function to change the option
	character from '/' to '-'.