Can modules be hotpatched?

127 Views Asked by At

I want to be able to hotpatch modules while the program is running for a project I'm working on. I tried this, but it doesn't work:

qx[rm -r .precomp/*];
try require PSBot;
try PSBot.test;

Is it possible to do? If so, how can I do it?

1

There are 1 best solutions below

2
jjmerelo On BEST ANSWER

No, they can't. CompUnits, compilation units or installed modules are immutable. You cannot unload a module to load it again, which is what you mean by hotfix.