in reply to update a running script
You could use exec instead of system. If your system call is followed by exit the most "visible" change is that the END blocks won't be executed. It also means that you won't have a stack of calling scripts through which you'll have to go back at the end of the execution. An update will actually mean that your script is replaced by another instance, not that it waits for it to return.
You could also reload your script partially, ie keep the main package still, and reload modules while running with Module::Reload::Selective. I've never used it though, so I can't tell you much about it.
|
|---|