keplerproject / orbit

Orbit is an MVC web framework for Lua.
http://keplerproject.github.io/orbit/
118 stars 35 forks source link

Fix requires in todo.ws #25

Closed kognix closed 10 years ago

kognix commented 10 years ago

Missing from my 2.2.1 pull request. Thanks @mascarenhas for manually merging, and @petsagouris for your feedback. Storms and many downed trees here this weekend have taken out my broadband, so have only very limited connectivity and couldn't rebase my repo - hope you can manually merge this before release (and fix char-encoding error in gh-pages / docs as spotted by @petsagouris). Cheers!

mascarenhas commented 10 years ago

Hi @kognix, I would prefer if we did not inject modules inside other modules:

+local orbit = require "orbit" +orbit.pages = require "orbit.pages"

It is better style to put the second module in another local:

local orbit = require "orbit" local orpages = require "orbit.pages"

Of course this also needs a search/replace for orbit.pages in the code, but it is easy to do.

kognix commented 10 years ago

Thanks @mascarenhas. Take your point about segregating the modules... better practice.

mascarenhas commented 10 years ago

I checked this out to make the change myself, and then noticed that the module was not in fact used in the code. :-)