rakuhotpatching

Can modules be hotpatched?


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?


Solution

  • 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.