Modules in Separate Directory

I just wondered if theres a way to reference a module in a separate directory? For example the CoronaUI module consists of a number of images and lua files and it would be cleaner if I could just have this in a subdirectory from my main app directory.

So instead of
local coronaui = require( “coronaui” )

it would be something like

local coronaui = require( “uimodule\coronaui” )

but that doesnt work, is it possible?

Cheers
Gary

[import]uid: 7334 topic_id: 10175 reply_id: 310175[/import]

Corona requires all lua files to stay in one folder with main.lua script, if we dont do that, the game wont work on device (since lua files on subdirectory will be ignored). You could require lua files on subdirectory only on simulator…

I hate it too [import]uid: 41267 topic_id: 10175 reply_id: 37154[/import]

That’s because the way corona handle lua files is very…basic. In a nutshell, it scans every file in the main directory and send it to their server. So if you have a malformed lua file that you don’t use in your game, it will work perfectly in the simulator but you will get an error when building for the device. [import]uid: 51516 topic_id: 10175 reply_id: 37164[/import]