[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why the dot in package.path? ..and finding the source filename
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 8 Jul 2009 15:11:25 +0200
On Wed, Jul 8, 2009 at 2:58 PM, Cosmin
Apreutesei<cosmin.apreutesei@gmail.com> wrote:
> I was wondering what's the point for current directory (the dot) in
> package.path? That is, above being a security risk, and not in the
> control of the script, but the caller...what am I missing? I have to
> parse package.path to remove those entries. Maybe I'm missing
> something obvious, I dunno...
Well, can always set LUA_PATH explicitly, or just recompile Lua ;)
It would be IMHO rather more useful to have something meaning
'directory of current module', so you could deploy an application that
just used require() to tie itself together. Currently this takes a
certain amount of hacking...
steve d.