standalone modules
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: standalone modules
- From: "Francisco Sant'anna" <francisco.santanna@...>
- Date: 2007年6月11日 21:40:39 -0300
Hello,
When creating a module sometimes is also useful to run it from the command line as a standalone application.
How to discover the invoke method?
Here's how I'm doing now:
-- checks if the module is being 'required' or executedlocal STANDALONE = (debug.getinfo(1).short_src == (arg and arg[0]))
module ((...) or 'default_name')...
if STANDALONE then whatever()
end