The work to cleanup rdxprof is now pretty much finished. All the functionality has been moved out into the
LCFG::Client module so that all that happens in the rdxprof code is 3 simple calls to subroutines in the core module:
- SetOptions – Parse the command line parameters and sets LCFG::Client variables
- Init – Initialises the environment (mostly just ensuring certain directories exist)
- Run – This does the actual work (either OneShot or ServerLoop)
There is still a small number of dependencies on global variables that would be nice to remove in the future but nothing critical for now.
This concludes goals 1 and 2 on the project plan. The hope was that this would only take one day of work but it ended up needing 2 days. That is due to my not having initially spotted the real degree of peculiarity of the coding style. The rdxprof code was definitely much more complex in terms of how it approached the “structure” of the entire program than anything I had encountered in the LCFG server code refactoring project. Hopefully now that particular intricate unpicking job is complete the rest will be more straightforward.