[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Changing behaviour of require and dofile
- From: "Tom Miles" <Tom@...>
- Date: Thu, 21 Aug 2008 10:12:36 +0100
>
> > can anyone give me any idea of what I will need to do to get lua to
> > check for the existance of a compiled file when require and dofile
> are
> > called?
>
> Lua loads source and precompiled files transparently. So, for require
> it's
> a simple matter of setting LUA_PATH or package.path correctly. For
> instance:
> precompiled/?.lua;source/?.lua
>
> For loadfile etc, you can redefine them to look in the path above.
Thanks for the help and advice. My system gets a little bit more
complicated than just loading one file over another as the compiled
files live in a pack file in a virtual file system, so I actually need
to redirect the file io to use the vfs. I've had to shelve this work
for a couple of days, but I will have a look at Pete's suggestions when
I get back onto it.
----------------------------------------------------------------------------
DISCLAIMER
This email is sent by The Creative Assembly Limited company No. 03425917, registered in England &Wales registered office 27 Great West Road, Middlesex, TW8 9BW, England. The contents of this e-mail and any attachments are confidential to the intended recipient and may also be legally privileged. Unless you are the named addressee (or authorised to receive for the addressee) of this email you may not copy, disclose or distribute it to anyone else. If you have received this email in error, please notify us immediately by e-mail on postmaster@creative-assembly.co.uk and then delete the email and any copies. The Creative Assembly Limited have made all reasonable efforts to ensure that this e-mail and any attached documents or software are free from software viruses, but it is the recipient's responsibility to confirm this.