lua-users home
lua-l archive

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


2011/2/24 Henderson, Michael D <michael.d.henderson@lmco.com>:
> On Thursday, February 24, 2011 11:18 AM Luiz Henrique de Figueiredo wrote
>> id    "batch@raw"
>>       account "dev"
>>               host            'rawdev'
>>               name            'batch01'
>>               instance        'raw'
>>       account "test"
>> ...
>> id    " batch@staging"
>> ...
>
> That would work perfectly!

You can also set the environment __newindex metamethod, to mix (or
replace) calls with assignments. For example :

id    "batch@raw"
      account "dev"
              host = 'rawdev'
              name = 'batch01'
              instance = 'raw'
      account "test"
...
id    " batch@staging"
...