[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: modules, require, magic
- From: Josh Simmons <simmons.44@...>
- Date: Sat, 22 Oct 2011 14:15:14 +1100
On Sat, Oct 22, 2011 at 2:07 PM, Sean Conner <sean@conman.org> wrote:
> It was thus said that the Great Josh Simmons once stated:
>> On Sat, Oct 22, 2011 at 10:07 AM, Sam Roberts <vieuxtech@gmail.com> wrote:
>> > On Fri, Oct 21, 2011 at 3:59 PM, Philipp Janda <siffiejoe@gmx.net> wrote:
>> >
>> > I just don't want to rewrite everything for dubious advantage.
>> >
>> You say rewrite but you mean s/^function /function M./c
>
> And then go back and fix every instance of "local function M." beacuse
> that causes a syntax error.
>
> And don't forget variables that might be part of a module. For instance,
> at work, I have a module that is nothing but values. Yeah, I could go back
> and change each line but still, I'm not a fan of manually placing stuff into
> the module table.
>
> -spc (I'm not happy with the global spamming of module, but the rest of it
> I like ...)
>
You missed the anchor at the start of that regex, and yes values need
another find/replace which altogether should take about 5 minutes and
result in a module that works in lua 5.1, 5.2 and luajit.
Not to mention it's being deprecated not purged instantly from the
earth, you don't have to go fix everything straight away. Funnily
enough however if you were to change the semantics of module, you
probably would.
It's Not That Difficult.
- References:
- modules, require, magic, Eduardo Ochs
- Re: modules, require, magic, Javier Guerra Giraldez
- Re: modules, require, magic, Petite Abeille
- Re: modules, require, magic, Sam Roberts
- Re: modules, require, magic, David Manura
- Re: modules, require, magic, Mark Hamburg
- Re: modules, require, magic, Sam Roberts
- Re: modules, require, magic, Philipp Janda
- Re: modules, require, magic, Sam Roberts
- Re: modules, require, magic, Josh Simmons
- Re: modules, require, magic, Sean Conner