[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: setfenv/getfenv
- From: Daniel Silverstone <dsilvers@...>
- Date: Tue, 12 Jan 2010 16:31:37 +0000
On Tue, Jan 12, 2010 at 02:18:21PM -0200, Roberto Ierusalimschy wrote:
> > To do this, I create an environment consisting of just the functions I want
> > exposed; then loadfile() the script, set the environment and then run the
> > function. [...]
>
> If I undestood you correctly, this is precisely the goal of the new
> function 'loadin'.
So this would be blah = loadin(pathtoscript, envtab) rather than blah =
loadfile(pathtoscript) setfenv(blah, envtab) ? That seems emminently
reasonable and pleasant to use.
Thanks,
Daniel.
--
Daniel Silverstone http://www.digital-scurf.org/
PGP mail accepted and encouraged. Key Id: 3CCE BABE 206C 3B69