def main is not shared
Posted: Fri May 15, 2009 3:59 am
That is to say, it does not have to be "shared" anymore. "Hello world" becomes: So `def main` can now be specified without `is shared` provided that the containing type has a parameterless initializer (so that it can be instantiated). And it can still be `shared` if that's required or desired.
Furthermore, `main` can no longer take arguments or return a value. Use `CobraCore.commandLineArgs` and `CobraCore.exit(code)` instead.
Finally, you can use the new -main: command line option to disambiguate when there is more than one `main` method. See cobra -h
This is in the repository. Any questions or problems, let me know.
class Hello
def main
print 'Hello, world.'
Furthermore, `main` can no longer take arguments or return a value. Use `CobraCore.commandLineArgs` and `CobraCore.exit(code)` instead.
Finally, you can use the new -main: command line option to disambiguate when there is more than one `main` method. See cobra -h
This is in the repository. Any questions or problems, let me know.