lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2017-02-19 7:03 GMT+00:00 Martin <eden_martin_fuhrspam@gmx.de>:
> So in CRC calculation routine I just wish to say something like
> "local crc_table = require('CRC_2bytes_EDB88320')" and then start
> xor-ing input with it.
>
> Yes, I may nullify "package.loaded" record for that module after
> work but it seems like struggling with consequences, not eliminating
> reason.

If you weren't using require in the first place, you wouldn't have to
struggle with consequences. Just use dofile+searchpath. The only
difference with require is that require does caching, which apparently
you don't want.