xopxe / lumen

Lua Multitasking Environment.
Other
153 stars 23 forks source link

require refactor #8

Closed andrewstarks closed 10 years ago

andrewstarks commented 10 years ago

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 getsched,log,pipes,stream,catalog, andmutex. 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 toinit.lua. The original way was fine, but it's more typical to use theinit.luaidiom. 4: Removed all occurrences of slashes within require. This works fine, it's just not standard. 5: Changed thepackage.pathamendment to go back two directories. This is needed because of the addition oflumen` as the root.

andrewstarks commented 10 years ago

One mistake was that I made to ALL of my pull requests was the addition of idle.lua Sorry about that. I'm pretty new to git and brand new to pull requests.

If this is a problem, please let me know and I'll redo things. Thanks!

xopxe commented 10 years ago

I'm with sketchy internet access for couple weeks, will merge now and perhaps do some cleanup later. I'm not sure of the etiquette neither, so don't know where to put your name :) (perhaps the readme? The few times I attempted to maintain a "changes" and "todo" files I failed miserably)

andrewstarks commented 10 years ago

No worries. Credit is not at all necessary, especially for such minor contributions. If there is a "contributors" section at the bottom of something, feel free to put me there. If not, don't think twice about it.