Lua 5.4 feature request: package.getloadmode

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Lua 5.4 feature request: package.getloadmode

Dirk Laurie-2
We have seen various ways on this list for package code to decide
whether it was invoked by require or load/loadfile/dofile, and whether
stdin is an interactive terminal. All have a strongly
implementation-dependent flavour. It would be nice to have a built-in
function for this purpose.

Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.4 feature request: package.getloadmode

Sean Conner
It was thus said that the Great Dirk Laurie once stated:
> We have seen various ways on this list for package code to decide
> whether it was invoked by require or load/loadfile/dofile, and whether
> stdin is an interactive terminal. All have a strongly
> implementation-dependent flavour. It would be nice to have a built-in
> function for this purpose.

  One function or two?  Because the two seem orthogonal to me.

  -spc