lua-users home
lua-l archive

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

I must confess I do not understand what "fail-proof method" means in this

'require' is a regular function, with no special rights. When a program
calls 'require', it does not even know whether it is actually calling
The Original 'require'.  Whatever The Original 'require' does, other
code can do too, if it wants to pretend the module is being "required".

If someone does 'loadfile "mod.lua" "mod"', it seems clear it wants
to mimic 'require'. What is wrong with that?

I can understand the need for a "fool-proof" method, instead of a
"fail-proof" method. So, will anyone do 'loadfile "mod.lua" "mod"'
without noticing the extra unrequested argument? Would that be
a realistic concern?

-- Roberto