[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Problems with lposix on win32
- From: Wim Couwenberg <w.couwenberg@...>
- Date: Mon, 16 Jan 2006 19:50:58 +0100
>> PS: I don't like the name osex. I'd simply put them into os.
> I don't think that's possible using the 5.1 package model. I suppose it
> is possible to make:
> require "osex"
> add things to the 'os' table, assuming it exists. But that seems, at
> least, poor practice.
It is possible in the 5.1 package model, but you still
have to know what you're doing:
in file os/ex.lua (or where-ever):
-- make sure that "os" is loaded first, otherwise
-- subsequent require("os") calls would only return our
-- extension set...
require "os"
-- now use the same table as package "os"
module "os"
-- all your os.ex stuff goes here...
-- don't forget to return our own module table or subsequent
-- require("os.ex") calls will simply return true...
return _M
Both Diego Nehab and myself have proposed alternatives for this (no
need to actually require "os" first nor to return the module table.)
Maybe this sort of thing is just not common enough (or poor practice,
like you said?)
--
Wim
- References:
- Problems with lposix on win32, Chris Marrin
- Re: Problems with lposix on win32, Wim Couwenberg
- Re: Problems with lposix on win32, Ryanne Thomas Dolan
- Re: Problems with lposix on win32, Wim Couwenberg
- Re: Problems with lposix on win32, Rici Lake
- Re: Problems with lposix on win32, D Burgess
- Re: Problems with lposix on win32, Chris Marrin
- Re: Problems with lposix on win32, D Burgess
- Re: Problems with lposix on win32, Chris Marrin
- Re: Problems with lposix on win32, D Burgess
- Re: Problems with lposix on win32, Edgar Toernig
- Re: Problems with lposix on win32, Chris Marrin
- Re: Problems with lposix on win32, Edgar Toernig
- Re: Problems with lposix on win32, Chris Marrin