Re: Auto-detecting whether script is stand-alone or module?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Auto-detecting whether script is stand-alone or module?
- From: Miles Bader <miles@...>
- Date: 2013年1月04日 23:48:12 +0900
steve donovan <steve.j.donovan@gmail.com> writes:
> Something like:
> if arg[0]:match 'module%.lua$' then
> ... we are a program...
I presume you mean:
if arg and type(arg) == 'table' and ...etc...
-miles
--
Dawn, n. When men of reason go to bed.