lua-users home
lua-l archive

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


FEATURE REQUEST: In python , we have a construct 
        if __name__ == “__main__”:  
so that if a module .lua file is executed by itself then this code block executes, but if this module is imported(required() as in lua) by other script file, then this code blosk is not executed. 
Can we have this construct in lua. This will be an important step in life of a lua module.

Kindly see for better explanation http://stackoverflow.com/a/20158605


Ashish Ranjan
ashishwave@yahoo.com