lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Wed, Sep 28, 2011 at 10:10 AM, Ian Good
> Wanted to introduce ratchet, a new library

One style point: The code [1] defines modules like

  require "package"
  local common = require "ratchet.http.common"
  module("ratchet.http.server", package.seeall)
  local class = getfenv()
  __index = class
  function new(socket, from, handlers, send_size)
     local self = {}
     setmetatable(self, class)

I think you can replace getfenv() here with _M.