check conf/autoload_configs/lua.conf.xml.  the module-directory and script-directory params contain the various paths that require will search for c modules and lua scripts respectively.

the question marks are replaced by what you pass to require, with the exception that dots are converted to path separators.

so if you have '/path/to/scripts/?.lua', and you do 'require "foo.lua"', it will look for '/path/to/scripts/foo/lua.lua' (i.e., replacing the ? with foo/lua).  if you 'require "foo"', then you'll of course get '/path/to/scripts/foo.lua'.

hope this helps.

hunmonk


Sent with Sparrow

On Monday, December 26, 2011 at 8:48 AM, Juan Antonio IbaƱez Santorum wrote:

Hello!

   I have one doubt about requier in Lua. I have one module coded in a fille called logging.lua. Why must I create '/usr/local/share/lua/5.1/logging/lua.lua' to be included in my main lua script instead creating '/usr/local/share/lua/5.1/logging.lua'?

Regards
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org