You might build something akin to Apache::Reload where you include a file with any new modules. The build process checks the file and installs any new modules needed. If it's empty, it just goes on it's way.
You might be able to use this to trigger upgrading a module as well.