[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Make "package.loaded" weak
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Sun, 19 Feb 2017 03:32:23 +0000
2017-02-19 7:03 GMT+00:00 Martin <firstname.lastname@example.org>:
> 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
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.