in reply to On-the-fly module replacements : On topic - really

It depends.

It's not too hard to force recompiling a module, do will do, and so will require and use (in an eval, after deleting it from %INC). It will replace the subs with new subs.

However, if the module also initializes variables (package variables, or lexicals with a file wide scope), those variables will reset (and note that a simple 'my $var;' is considered an initialization). Depending on the module, this may break your program.

So, the answer is 'yes', but you want to be careful how you code your module.

  • Comment on Re: On-the-fly module replacements : On topic - really