lua-users home
lua-l archive

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


2015-09-23 16:04 GMT+02:00 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>>   - require will pass the module name to the file chunk as argument
>
> Since Lua 5.2, require also passes the path to the file:
>
> % cat m.lua
> print("args",...)
>
> % lua -lm /dev/null
> args    m       ./m.lua
>
> % lua m.lua
> args

In other words, there is stuff in `...` in the case of require,
nothing otherwise. Thanks, I was using "arg" and figured
out that it does not deliver.

I have never understood what the manual means by "loader".
Is "mymod.lua" a loader for the module "mymod"?