xopxe/Lumen — pull request #8 by andrewstarks (2014-02-02 05:04:27+00:00)
Title: require refactor

I went through all of the files, looking for places where require was used. In summary, the changes are:

1: `lumen` is the root for all requires. I change the documentation to reflect this.
2: Add an `init.lua` file in root, which loads the base modules. In all non-base modules, you can `require 'lumen' and you'll get `sched`, `log`, `pipes`, `stream`, `catalog`, and `mutex`. I still assigned each of these to a local, for the slight speed increase and to keep the changes light.
3: Moved the http server's main file into its directory and renamed it to `init.lua`. The original way was fine, but it's more typical to use the `init.lua` idiom.
4: Removed all occurrences of slashes within require. This works fine, it's just not standard.
5: Changed the `package.path` amendment to go back two directories. This is needed because of the addition of `lumen` as the root.