When a script uses a config file that is a perl package, and that package gets changed, it must be reloaded. This can happen either through Apache::StatINC, or Apache::Reload. With both methods you must wait for about a second for perl to 'let go' of the config packages before performing any actions on those files. Otherwise all sort of intermittent weirdness will occur, (e.g. when running the script multiple times in a test and changing the config files inbetween).
Using
StatINC_UndefOnReload On can cause all manner of strange errors if you run a script/module, then do :w on the module in vim but don't change anything, then run the script/module again.
Using
PerlFreshRestart On causes lots of "Attempt to free unreferenced scalar" errors
Also, when changing the contents of perl configuration 'packages', the modification date on the file must be changed for any Apache module to reload it. Remember that
move doesn't change the modification date of files, but
copy does. So copy and unlink files, don't move them.