13 points · by mcandre · 15y ago · 3 comments
Ruby: if __FILE__ == $0 then main end
Perl: unless(caller) { main; }
...
https://github.com/mcandre/scriptedmain
Does anyone know the syntax for this in GNU Smalltalk?
(Presuming you've gone and defined the main() function somewhere. No module conventions like with Python here.)
if (!module.parent) { // your main here }