[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Can a Lua module find out whether it is being required or dofiled?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 23 Sep 2015 14:58:35 +0200
In a program, one can say
mymod = require "mymod"
or
mymod = dofile "mymod.lua"
Is there any way that the code of "mymod.lua" can distinguish
between these?